var sC=Object.defineProperty;var ny=e=>{throw TypeError(e)};var iC=(e,t,n)=>t in e?sC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var De=(e,t,n)=>iC(e,typeof t!="symbol"?t+"":t,n),xd=(e,t,n)=>t.has(e)||ny("Cannot "+n);var O=(e,t,n)=>(xd(e,t,"read from private field"),n?n.call(e):t.get(e)),me=(e,t,n)=>t.has(e)?ny("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),te=(e,t,n,s)=>(xd(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),Ae=(e,t,n)=>(xd(e,t,"access private method"),n);var El=(e,t,n,s)=>({set _(o){te(e,t,o,n)},get _(){return O(e,t,s)}});function oC(e,t){for(var n=0;ns[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function eh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wd={exports:{}},So={},bd={exports:{}},Pe={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ry;function aC(){if(ry)return Pe;ry=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.iterator;function x(L){return L===null||typeof L!="object"?null:(L=y&&L[y]||L["@@iterator"],typeof L=="function"?L:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},P=Object.assign,C={};function b(L,$,de){this.props=L,this.context=$,this.refs=C,this.updater=de||E}b.prototype.isReactComponent={},b.prototype.setState=function(L,$){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,$,"setState")},b.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function S(){}S.prototype=b.prototype;function R(L,$,de){this.props=L,this.context=$,this.refs=C,this.updater=de||E}var k=R.prototype=new S;k.constructor=R,P(k,b.prototype),k.isPureReactComponent=!0;var A=Array.isArray,M=Object.prototype.hasOwnProperty,U={current:null},W={key:!0,ref:!0,__self:!0,__source:!0};function V(L,$,de){var ge,pe={},X=null,Se=null;if($!=null)for(ge in $.ref!==void 0&&(Se=$.ref),$.key!==void 0&&(X=""+$.key),$)M.call($,ge)&&!W.hasOwnProperty(ge)&&(pe[ge]=$[ge]);var Re=arguments.length-2;if(Re===1)pe.children=de;else if(1>>1,$=K[L];if(0>>1;Lo(pe,z))X<$&&0>o(Se,pe)?(K[L]=Se,K[X]=z,L=X):(K[L]=pe,K[ge]=z,L=ge);else if(X<$&&0>o(Se,z))K[L]=Se,K[X]=z,L=X;else break e}}return se}function o(K,se){var z=K.sortIndex-se.sortIndex;return z!==0?z:K.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var f=[],p=[],g=1,y=null,x=3,E=!1,P=!1,C=!1,b=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(K){for(var se=n(p);se!==null;){if(se.callback===null)s(p);else if(se.startTime<=K)s(p),se.sortIndex=se.expirationTime,t(f,se);else break;se=n(p)}}function A(K){if(C=!1,k(K),!P)if(n(f)!==null)P=!0,Ce(M);else{var se=n(p);se!==null&&ue(A,se.startTime-K)}}function M(K,se){P=!1,C&&(C=!1,S(V),V=-1),E=!0;var z=x;try{for(k(se),y=n(f);y!==null&&(!(y.expirationTime>se)||K&&!ve());){var L=y.callback;if(typeof L=="function"){y.callback=null,x=y.priorityLevel;var $=L(y.expirationTime<=se);se=e.unstable_now(),typeof $=="function"?y.callback=$:y===n(f)&&s(f),k(se)}else s(f);y=n(f)}if(y!==null)var de=!0;else{var ge=n(p);ge!==null&&ue(A,ge.startTime-se),de=!1}return de}finally{y=null,x=z,E=!1}}var U=!1,W=null,V=-1,Y=5,ne=-1;function ve(){return!(e.unstable_now()-neK||125L?(K.sortIndex=z,t(p,K),n(f)===null&&K===n(p)&&(C?(S(V),V=-1):C=!0,ue(A,z-L))):(K.sortIndex=$,t(f,K),P||E||(P=!0,Ce(M))),K},e.unstable_shouldYield=ve,e.unstable_wrapCallback=function(K){var se=x;return function(){var z=x;x=se;try{return K.apply(this,arguments)}finally{x=z}}}})(Cd)),Cd}var ly;function dC(){return ly||(ly=1,Ed.exports=uC()),Ed.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var cy;function fC(){if(cy)return Ft;cy=1;var e=th(),t=dC();function n(r){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+r,a=1;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},y={};function x(r){return f.call(y,r)?!0:f.call(g,r)?!1:p.test(r)?y[r]=!0:(g[r]=!0,!1)}function E(r,i,a,u){if(a!==null&&a.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return u?!1:a!==null?!a.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function P(r,i,a,u){if(i===null||typeof i>"u"||E(r,i,a,u))return!0;if(u)return!1;if(a!==null)switch(a.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function C(r,i,a,u,h,m,w){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=u,this.attributeNamespace=h,this.mustUseProperty=a,this.propertyName=r,this.type=i,this.sanitizeURL=m,this.removeEmptyString=w}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){b[r]=new C(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var i=r[0];b[i]=new C(i,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){b[r]=new C(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){b[r]=new C(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){b[r]=new C(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){b[r]=new C(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){b[r]=new C(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){b[r]=new C(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){b[r]=new C(r,5,!1,r.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function R(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var i=r.replace(S,R);b[i]=new C(i,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var i=r.replace(S,R);b[i]=new C(i,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var i=r.replace(S,R);b[i]=new C(i,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){b[r]=new C(r,1,!1,r.toLowerCase(),null,!1,!1)}),b.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){b[r]=new C(r,1,!1,r.toLowerCase(),null,!0,!0)});function k(r,i,a,u){var h=b.hasOwnProperty(i)?b[i]:null;(h!==null?h.type!==0:u||!(2_||h[w]!==m[_]){var N=` `+h[w].replace(" at new "," at ");return r.displayName&&N.includes("")&&(N=N.replace("",r.displayName)),N}while(1<=w&&0<=_);break}}}finally{de=!1,Error.prepareStackTrace=a}return(r=r?r.displayName||r.name:"")?$(r):""}function pe(r){switch(r.tag){case 5:return $(r.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return r=ge(r.type,!1),r;case 11:return r=ge(r.type.render,!1),r;case 1:return r=ge(r.type,!0),r;default:return""}}function X(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case W:return"Fragment";case U:return"Portal";case Y:return"Profiler";case V:return"StrictMode";case be:return"Suspense";case J:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case ve:return(r.displayName||"Context")+".Consumer";case ne:return(r._context.displayName||"Context")+".Provider";case _e:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case Te:return i=r.displayName||null,i!==null?i:X(r.type)||"Memo";case Ce:i=r._payload,r=r._init;try{return X(r(i))}catch{}}return null}function Se(r){var i=r.type;switch(r.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=i.render,r=r.displayName||r.name||"",i.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return X(i);case 8:return i===V?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function Re(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function we(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function ot(r){var i=we(r)?"checked":"value",a=Object.getOwnPropertyDescriptor(r.constructor.prototype,i),u=""+r[i];if(!r.hasOwnProperty(i)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,m=a.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return h.call(this)},set:function(w){u=""+w,m.call(this,w)}}),Object.defineProperty(r,i,{enumerable:a.enumerable}),{getValue:function(){return u},setValue:function(w){u=""+w},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function Yt(r){r._valueTracker||(r._valueTracker=ot(r))}function ht(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var a=i.getValue(),u="";return r&&(u=we(r)?r.checked?"true":"false":r.value),r=u,r!==a?(i.setValue(r),!0):!1}function dn(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Xt(r,i){var a=i.checked;return z({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??r._wrapperState.initialChecked})}function Zt(r,i){var a=i.defaultValue==null?"":i.defaultValue,u=i.checked!=null?i.checked:i.defaultChecked;a=Re(i.value!=null?i.value:a),r._wrapperState={initialChecked:u,initialValue:a,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function Ee(r,i){i=i.checked,i!=null&&k(r,"checked",i,!1)}function pt(r,i){Ee(r,i);var a=Re(i.value),u=i.type;if(a!=null)u==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+a):r.value!==""+a&&(r.value=""+a);else if(u==="submit"||u==="reset"){r.removeAttribute("value");return}i.hasOwnProperty("value")?hn(r,i.type,a):i.hasOwnProperty("defaultValue")&&hn(r,i.type,Re(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(r.defaultChecked=!!i.defaultChecked)}function fn(r,i,a){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var u=i.type;if(!(u!=="submit"&&u!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+r._wrapperState.initialValue,a||i===r.value||(r.value=i),r.defaultValue=i}a=r.name,a!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,a!==""&&(r.name=a)}function hn(r,i,a){(i!=="number"||dn(r.ownerDocument)!==r)&&(a==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+a&&(r.defaultValue=""+a))}var ir=Array.isArray;function or(r,i,a,u){if(r=r.options,i){i={};for(var h=0;h"+i.valueOf().toString()+"",i=ma.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;i.firstChild;)r.appendChild(i.firstChild)}});function Ii(r,i){if(i){var a=r.firstChild;if(a&&a===r.lastChild&&a.nodeType===3){a.nodeValue=i;return}}r.textContent=i}var Fi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},lS=["Webkit","ms","Moz","O"];Object.keys(Fi).forEach(function(r){lS.forEach(function(i){i=i+r.charAt(0).toUpperCase()+r.substring(1),Fi[i]=Fi[r]})});function yp(r,i,a){return i==null||typeof i=="boolean"||i===""?"":a||typeof i!="number"||i===0||Fi.hasOwnProperty(r)&&Fi[r]?(""+i).trim():i+"px"}function vp(r,i){r=r.style;for(var a in i)if(i.hasOwnProperty(a)){var u=a.indexOf("--")===0,h=yp(a,i[a],u);a==="float"&&(a="cssFloat"),u?r.setProperty(a,h):r[a]=h}}var cS=z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Nc(r,i){if(i){if(cS[r]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(n(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(n(61))}if(i.style!=null&&typeof i.style!="object")throw Error(n(62))}}function Oc(r,i){if(r.indexOf("-")===-1)return typeof i.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jc=null;function Lc(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Dc=null,Ds=null,Ms=null;function xp(r){if(r=oo(r)){if(typeof Dc!="function")throw Error(n(280));var i=r.stateNode;i&&(i=Fa(i),Dc(r.stateNode,r.type,i))}}function wp(r){Ds?Ms?Ms.push(r):Ms=[r]:Ds=r}function bp(){if(Ds){var r=Ds,i=Ms;if(Ms=Ds=null,xp(r),i)for(r=0;r>>=0,r===0?32:31-(wS(r)/bS|0)|0}var wa=64,ba=4194304;function zi(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Sa(r,i){var a=r.pendingLanes;if(a===0)return 0;var u=0,h=r.suspendedLanes,m=r.pingedLanes,w=a&268435455;if(w!==0){var _=w&~h;_!==0?u=zi(_):(m&=w,m!==0&&(u=zi(m)))}else w=a&~h,w!==0?u=zi(w):m!==0&&(u=zi(m));if(u===0)return 0;if(i!==0&&i!==u&&(i&h)===0&&(h=u&-u,m=i&-i,h>=m||h===16&&(m&4194240)!==0))return i;if((u&4)!==0&&(u|=a&16),i=r.entangledLanes,i!==0)for(r=r.entanglements,i&=u;0a;a++)i.push(r);return i}function $i(r,i,a){r.pendingLanes|=i,i!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,i=31-pn(i),r[i]=a}function TS(r,i){var a=r.pendingLanes&~i;r.pendingLanes=i,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=i,r.mutableReadLanes&=i,r.entangledLanes&=i,i=r.entanglements;var u=r.eventTimes;for(r=r.expirationTimes;0=Xi),Gp=" ",Yp=!1;function Xp(r,i){switch(r){case"keyup":return JS.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zp(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Vs=!1;function tE(r,i){switch(r){case"compositionend":return Zp(i);case"keypress":return i.which!==32?null:(Yp=!0,Gp);case"textInput":return r=i.data,r===Gp&&Yp?null:r;default:return null}}function nE(r,i){if(Vs)return r==="compositionend"||!Jc&&Xp(r,i)?(r=$p(),ka=Qc=dr=null,Vs=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1=i)return{node:a,offset:i-r};r=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=im(a)}}function am(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?am(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function lm(){for(var r=window,i=dn();i instanceof r.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)r=i.contentWindow;else break;i=dn(r.document)}return i}function nu(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}function dE(r){var i=lm(),a=r.focusedElem,u=r.selectionRange;if(i!==a&&a&&a.ownerDocument&&am(a.ownerDocument.documentElement,a)){if(u!==null&&nu(a)){if(i=u.start,r=u.end,r===void 0&&(r=i),"selectionStart"in a)a.selectionStart=i,a.selectionEnd=Math.min(r,a.value.length);else if(r=(i=a.ownerDocument||document)&&i.defaultView||window,r.getSelection){r=r.getSelection();var h=a.textContent.length,m=Math.min(u.start,h);u=u.end===void 0?m:Math.min(u.end,h),!r.extend&&m>u&&(h=u,u=m,m=h),h=om(a,m);var w=om(a,u);h&&w&&(r.rangeCount!==1||r.anchorNode!==h.node||r.anchorOffset!==h.offset||r.focusNode!==w.node||r.focusOffset!==w.offset)&&(i=i.createRange(),i.setStart(h.node,h.offset),r.removeAllRanges(),m>u?(r.addRange(i),r.extend(w.node,w.offset)):(i.setEnd(w.node,w.offset),r.addRange(i)))}}for(i=[],r=a;r=r.parentNode;)r.nodeType===1&&i.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a=document.documentMode,Bs=null,ru=null,to=null,su=!1;function cm(r,i,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;su||Bs==null||Bs!==dn(u)||(u=Bs,"selectionStart"in u&&nu(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),to&&eo(to,u)||(to=u,u=Da(ru,"onSelect"),0Ws||(r.current=gu[Ws],gu[Ws]=null,Ws--)}function Be(r,i){Ws++,gu[Ws]=r.current,r.current=i}var mr={},wt=pr(mr),jt=pr(!1),Gr=mr;function qs(r,i){var a=r.type.contextTypes;if(!a)return mr;var u=r.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===i)return u.__reactInternalMemoizedMaskedChildContext;var h={},m;for(m in a)h[m]=i[m];return u&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=i,r.__reactInternalMemoizedMaskedChildContext=h),h}function Lt(r){return r=r.childContextTypes,r!=null}function Va(){ze(jt),ze(wt)}function Cm(r,i,a){if(wt.current!==mr)throw Error(n(168));Be(wt,i),Be(jt,a)}function Tm(r,i,a){var u=r.stateNode;if(i=i.childContextTypes,typeof u.getChildContext!="function")return a;u=u.getChildContext();for(var h in u)if(!(h in i))throw Error(n(108,Se(r)||"Unknown",h));return z({},a,u)}function Ba(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||mr,Gr=wt.current,Be(wt,r),Be(jt,jt.current),!0}function _m(r,i,a){var u=r.stateNode;if(!u)throw Error(n(169));a?(r=Tm(r,i,Gr),u.__reactInternalMemoizedMergedChildContext=r,ze(jt),ze(wt),Be(wt,r)):ze(jt),Be(jt,a)}var Hn=null,Ua=!1,yu=!1;function km(r){Hn===null?Hn=[r]:Hn.push(r)}function EE(r){Ua=!0,km(r)}function gr(){if(!yu&&Hn!==null){yu=!0;var r=0,i=Fe;try{var a=Hn;for(Fe=1;r>=w,h-=w,Wn=1<<32-pn(i)+h|a<xe?(ct=he,he=null):ct=he.sibling;var Le=H(I,he,F[xe],G);if(Le===null){he===null&&(he=ct);break}r&&he&&Le.alternate===null&&i(I,he),j=m(Le,j,xe),fe===null?ce=Le:fe.sibling=Le,fe=Le,he=ct}if(xe===F.length)return a(I,he),$e&&Xr(I,xe),ce;if(he===null){for(;xexe?(ct=he,he=null):ct=he.sibling;var Tr=H(I,he,Le.value,G);if(Tr===null){he===null&&(he=ct);break}r&&he&&Tr.alternate===null&&i(I,he),j=m(Tr,j,xe),fe===null?ce=Tr:fe.sibling=Tr,fe=Tr,he=ct}if(Le.done)return a(I,he),$e&&Xr(I,xe),ce;if(he===null){for(;!Le.done;xe++,Le=F.next())Le=Q(I,Le.value,G),Le!==null&&(j=m(Le,j,xe),fe===null?ce=Le:fe.sibling=Le,fe=Le);return $e&&Xr(I,xe),ce}for(he=u(I,he);!Le.done;xe++,Le=F.next())Le=ee(he,I,xe,Le.value,G),Le!==null&&(r&&Le.alternate!==null&&he.delete(Le.key===null?xe:Le.key),j=m(Le,j,xe),fe===null?ce=Le:fe.sibling=Le,fe=Le);return r&&he.forEach(function(rC){return i(I,rC)}),$e&&Xr(I,xe),ce}function Xe(I,j,F,G){if(typeof F=="object"&&F!==null&&F.type===W&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case M:e:{for(var ce=F.key,fe=j;fe!==null;){if(fe.key===ce){if(ce=F.type,ce===W){if(fe.tag===7){a(I,fe.sibling),j=h(fe,F.props.children),j.return=I,I=j;break e}}else if(fe.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===Ce&&jm(ce)===fe.type){a(I,fe.sibling),j=h(fe,F.props),j.ref=ao(I,fe,F),j.return=I,I=j;break e}a(I,fe);break}else i(I,fe);fe=fe.sibling}F.type===W?(j=is(F.props.children,I.mode,G,F.key),j.return=I,I=j):(G=ml(F.type,F.key,F.props,null,I.mode,G),G.ref=ao(I,j,F),G.return=I,I=G)}return w(I);case U:e:{for(fe=F.key;j!==null;){if(j.key===fe)if(j.tag===4&&j.stateNode.containerInfo===F.containerInfo&&j.stateNode.implementation===F.implementation){a(I,j.sibling),j=h(j,F.children||[]),j.return=I,I=j;break e}else{a(I,j);break}else i(I,j);j=j.sibling}j=pd(F,I.mode,G),j.return=I,I=j}return w(I);case Ce:return fe=F._init,Xe(I,j,fe(F._payload),G)}if(ir(F))return ie(I,j,F,G);if(se(F))return le(I,j,F,G);Wa(I,F)}return typeof F=="string"&&F!==""||typeof F=="number"?(F=""+F,j!==null&&j.tag===6?(a(I,j.sibling),j=h(j,F),j.return=I,I=j):(a(I,j),j=hd(F,I.mode,G),j.return=I,I=j),w(I)):a(I,j)}return Xe}var Ys=Lm(!0),Dm=Lm(!1),qa=pr(null),Qa=null,Xs=null,Eu=null;function Cu(){Eu=Xs=Qa=null}function Tu(r){var i=qa.current;ze(qa),r._currentValue=i}function _u(r,i,a){for(;r!==null;){var u=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,u!==null&&(u.childLanes|=i)):u!==null&&(u.childLanes&i)!==i&&(u.childLanes|=i),r===a)break;r=r.return}}function Zs(r,i){Qa=r,Eu=Xs=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&i)!==0&&(Dt=!0),r.firstContext=null)}function tn(r){var i=r._currentValue;if(Eu!==r)if(r={context:r,memoizedValue:i,next:null},Xs===null){if(Qa===null)throw Error(n(308));Xs=r,Qa.dependencies={lanes:0,firstContext:r}}else Xs=Xs.next=r;return i}var Zr=null;function ku(r){Zr===null?Zr=[r]:Zr.push(r)}function Mm(r,i,a,u){var h=i.interleaved;return h===null?(a.next=a,ku(i)):(a.next=h.next,h.next=a),i.interleaved=a,Qn(r,u)}function Qn(r,i){r.lanes|=i;var a=r.alternate;for(a!==null&&(a.lanes|=i),a=r,r=r.return;r!==null;)r.childLanes|=i,a=r.alternate,a!==null&&(a.childLanes|=i),a=r,r=r.return;return a.tag===3?a.stateNode:null}var yr=!1;function Pu(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Im(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Kn(r,i){return{eventTime:r,lane:i,tag:0,payload:null,callback:null,next:null}}function vr(r,i,a){var u=r.updateQueue;if(u===null)return null;if(u=u.shared,(je&2)!==0){var h=u.pending;return h===null?i.next=i:(i.next=h.next,h.next=i),u.pending=i,Qn(r,a)}return h=u.interleaved,h===null?(i.next=i,ku(u)):(i.next=h.next,h.next=i),u.interleaved=i,Qn(r,a)}function Ka(r,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194240)!==0)){var u=i.lanes;u&=r.pendingLanes,a|=u,i.lanes=a,zc(r,a)}}function Fm(r,i){var a=r.updateQueue,u=r.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var h=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var w={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};m===null?h=m=w:m=m.next=w,a=a.next}while(a!==null);m===null?h=m=i:m=m.next=i}else h=m=i;a={baseState:u.baseState,firstBaseUpdate:h,lastBaseUpdate:m,shared:u.shared,effects:u.effects},r.updateQueue=a;return}r=a.lastBaseUpdate,r===null?a.firstBaseUpdate=i:r.next=i,a.lastBaseUpdate=i}function Ga(r,i,a,u){var h=r.updateQueue;yr=!1;var m=h.firstBaseUpdate,w=h.lastBaseUpdate,_=h.shared.pending;if(_!==null){h.shared.pending=null;var N=_,B=N.next;N.next=null,w===null?m=B:w.next=B,w=N;var q=r.alternate;q!==null&&(q=q.updateQueue,_=q.lastBaseUpdate,_!==w&&(_===null?q.firstBaseUpdate=B:_.next=B,q.lastBaseUpdate=N))}if(m!==null){var Q=h.baseState;w=0,q=B=N=null,_=m;do{var H=_.lane,ee=_.eventTime;if((u&H)===H){q!==null&&(q=q.next={eventTime:ee,lane:0,tag:_.tag,payload:_.payload,callback:_.callback,next:null});e:{var ie=r,le=_;switch(H=i,ee=a,le.tag){case 1:if(ie=le.payload,typeof ie=="function"){Q=ie.call(ee,Q,H);break e}Q=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=le.payload,H=typeof ie=="function"?ie.call(ee,Q,H):ie,H==null)break e;Q=z({},Q,H);break e;case 2:yr=!0}}_.callback!==null&&_.lane!==0&&(r.flags|=64,H=h.effects,H===null?h.effects=[_]:H.push(_))}else ee={eventTime:ee,lane:H,tag:_.tag,payload:_.payload,callback:_.callback,next:null},q===null?(B=q=ee,N=Q):q=q.next=ee,w|=H;if(_=_.next,_===null){if(_=h.shared.pending,_===null)break;H=_,_=H.next,H.next=null,h.lastBaseUpdate=H,h.shared.pending=null}}while(!0);if(q===null&&(N=Q),h.baseState=N,h.firstBaseUpdate=B,h.lastBaseUpdate=q,i=h.shared.interleaved,i!==null){h=i;do w|=h.lane,h=h.next;while(h!==i)}else m===null&&(h.shared.lanes=0);ts|=w,r.lanes=w,r.memoizedState=Q}}function Vm(r,i,a){if(r=i.effects,i.effects=null,r!==null)for(i=0;ia?a:4,r(!0);var u=ju.transition;ju.transition={};try{r(!1),i()}finally{Fe=a,ju.transition=u}}function sg(){return nn().memoizedState}function kE(r,i,a){var u=Sr(r);if(a={lane:u,action:a,hasEagerState:!1,eagerState:null,next:null},ig(r))og(i,a);else if(a=Mm(r,i,a,u),a!==null){var h=At();wn(a,r,u,h),ag(a,i,u)}}function PE(r,i,a){var u=Sr(r),h={lane:u,action:a,hasEagerState:!1,eagerState:null,next:null};if(ig(r))og(i,h);else{var m=r.alternate;if(r.lanes===0&&(m===null||m.lanes===0)&&(m=i.lastRenderedReducer,m!==null))try{var w=i.lastRenderedState,_=m(w,a);if(h.hasEagerState=!0,h.eagerState=_,mn(_,w)){var N=i.interleaved;N===null?(h.next=h,ku(i)):(h.next=N.next,N.next=h),i.interleaved=h;return}}catch{}finally{}a=Mm(r,i,h,u),a!==null&&(h=At(),wn(a,r,u,h),ag(a,i,u))}}function ig(r){var i=r.alternate;return r===We||i!==null&&i===We}function og(r,i){fo=Za=!0;var a=r.pending;a===null?i.next=i:(i.next=a.next,a.next=i),r.pending=i}function ag(r,i,a){if((a&4194240)!==0){var u=i.lanes;u&=r.pendingLanes,a|=u,i.lanes=a,zc(r,a)}}var tl={readContext:tn,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useInsertionEffect:bt,useLayoutEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useMutableSource:bt,useSyncExternalStore:bt,useId:bt,unstable_isNewReconciler:!1},RE={readContext:tn,useCallback:function(r,i){return An().memoizedState=[r,i===void 0?null:i],r},useContext:tn,useEffect:Ym,useImperativeHandle:function(r,i,a){return a=a!=null?a.concat([r]):null,Ja(4194308,4,Jm.bind(null,i,r),a)},useLayoutEffect:function(r,i){return Ja(4194308,4,r,i)},useInsertionEffect:function(r,i){return Ja(4,2,r,i)},useMemo:function(r,i){var a=An();return i=i===void 0?null:i,r=r(),a.memoizedState=[r,i],r},useReducer:function(r,i,a){var u=An();return i=a!==void 0?a(i):i,u.memoizedState=u.baseState=i,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:i},u.queue=r,r=r.dispatch=kE.bind(null,We,r),[u.memoizedState,r]},useRef:function(r){var i=An();return r={current:r},i.memoizedState=r},useState:Km,useDebugValue:Bu,useDeferredValue:function(r){return An().memoizedState=r},useTransition:function(){var r=Km(!1),i=r[0];return r=_E.bind(null,r[1]),An().memoizedState=r,[i,r]},useMutableSource:function(){},useSyncExternalStore:function(r,i,a){var u=We,h=An();if($e){if(a===void 0)throw Error(n(407));a=a()}else{if(a=i(),lt===null)throw Error(n(349));(es&30)!==0||$m(u,i,a)}h.memoizedState=a;var m={value:a,getSnapshot:i};return h.queue=m,Ym(Wm.bind(null,u,m,r),[r]),u.flags|=2048,mo(9,Hm.bind(null,u,m,a,i),void 0,null),a},useId:function(){var r=An(),i=lt.identifierPrefix;if($e){var a=qn,u=Wn;a=(u&~(1<<32-pn(u)-1)).toString(32)+a,i=":"+i+"R"+a,a=ho++,0<\/script>",r=r.removeChild(r.firstChild)):typeof u.is=="string"?r=w.createElement(a,{is:u.is}):(r=w.createElement(a),a==="select"&&(w=r,u.multiple?w.multiple=!0:u.size&&(w.size=u.size))):r=w.createElementNS(r,a),r[Pn]=i,r[io]=u,kg(r,i,!1,!1),i.stateNode=r;e:{switch(w=Oc(a,u),a){case"dialog":Ue("cancel",r),Ue("close",r),h=u;break;case"iframe":case"object":case"embed":Ue("load",r),h=u;break;case"video":case"audio":for(h=0;hri&&(i.flags|=128,u=!0,go(m,!1),i.lanes=4194304)}else{if(!u)if(r=Ya(w),r!==null){if(i.flags|=128,u=!0,a=r.updateQueue,a!==null&&(i.updateQueue=a,i.flags|=4),go(m,!0),m.tail===null&&m.tailMode==="hidden"&&!w.alternate&&!$e)return St(i),null}else 2*Ye()-m.renderingStartTime>ri&&a!==1073741824&&(i.flags|=128,u=!0,go(m,!1),i.lanes=4194304);m.isBackwards?(w.sibling=i.child,i.child=w):(a=m.last,a!==null?a.sibling=w:i.child=w,m.last=w)}return m.tail!==null?(i=m.tail,m.rendering=i,m.tail=i.sibling,m.renderingStartTime=Ye(),i.sibling=null,a=He.current,Be(He,u?a&1|2:a&1),i):(St(i),null);case 22:case 23:return ud(),u=i.memoizedState!==null,r!==null&&r.memoizedState!==null!==u&&(i.flags|=8192),u&&(i.mode&1)!==0?(Qt&1073741824)!==0&&(St(i),i.subtreeFlags&6&&(i.flags|=8192)):St(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function IE(r,i){switch(xu(i),i.tag){case 1:return Lt(i.type)&&Va(),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Js(),ze(jt),ze(wt),Ou(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 5:return Au(i),null;case 13:if(ze(He),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(n(340));Gs()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return ze(He),null;case 4:return Js(),null;case 10:return Tu(i.type._context),null;case 22:case 23:return ud(),null;case 24:return null;default:return null}}var il=!1,Et=!1,FE=typeof WeakSet=="function"?WeakSet:Set,re=null;function ti(r,i){var a=r.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(u){Qe(r,i,u)}else a.current=null}function Zu(r,i,a){try{a()}catch(u){Qe(r,i,u)}}var Ag=!1;function VE(r,i){if(uu=Ta,r=lm(),nu(r)){if("selectionStart"in r)var a={start:r.selectionStart,end:r.selectionEnd};else e:{a=(a=r.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var h=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var w=0,_=-1,N=-1,B=0,q=0,Q=r,H=null;t:for(;;){for(var ee;Q!==a||h!==0&&Q.nodeType!==3||(_=w+h),Q!==m||u!==0&&Q.nodeType!==3||(N=w+u),Q.nodeType===3&&(w+=Q.nodeValue.length),(ee=Q.firstChild)!==null;)H=Q,Q=ee;for(;;){if(Q===r)break t;if(H===a&&++B===h&&(_=w),H===m&&++q===u&&(N=w),(ee=Q.nextSibling)!==null)break;Q=H,H=Q.parentNode}Q=ee}a=_===-1||N===-1?null:{start:_,end:N}}else a=null}a=a||{start:0,end:0}}else a=null;for(du={focusedElem:r,selectionRange:a},Ta=!1,re=i;re!==null;)if(i=re,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,re=r;else for(;re!==null;){i=re;try{var ie=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(ie!==null){var le=ie.memoizedProps,Xe=ie.memoizedState,I=i.stateNode,j=I.getSnapshotBeforeUpdate(i.elementType===i.type?le:yn(i.type,le),Xe);I.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var F=i.stateNode.containerInfo;F.nodeType===1?F.textContent="":F.nodeType===9&&F.documentElement&&F.removeChild(F.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(G){Qe(i,i.return,G)}if(r=i.sibling,r!==null){r.return=i.return,re=r;break}re=i.return}return ie=Ag,Ag=!1,ie}function yo(r,i,a){var u=i.updateQueue;if(u=u!==null?u.lastEffect:null,u!==null){var h=u=u.next;do{if((h.tag&r)===r){var m=h.destroy;h.destroy=void 0,m!==void 0&&Zu(i,a,m)}h=h.next}while(h!==u)}}function ol(r,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&r)===r){var u=a.create;a.destroy=u()}a=a.next}while(a!==i)}}function Ju(r){var i=r.ref;if(i!==null){var a=r.stateNode;switch(r.tag){case 5:r=a;break;default:r=a}typeof i=="function"?i(r):i.current=r}}function Ng(r){var i=r.alternate;i!==null&&(r.alternate=null,Ng(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&(delete i[Pn],delete i[io],delete i[mu],delete i[bE],delete i[SE])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function Og(r){return r.tag===5||r.tag===3||r.tag===4}function jg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Og(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function ed(r,i,a){var u=r.tag;if(u===5||u===6)r=r.stateNode,i?a.nodeType===8?a.parentNode.insertBefore(r,i):a.insertBefore(r,i):(a.nodeType===8?(i=a.parentNode,i.insertBefore(r,a)):(i=a,i.appendChild(r)),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=Ia));else if(u!==4&&(r=r.child,r!==null))for(ed(r,i,a),r=r.sibling;r!==null;)ed(r,i,a),r=r.sibling}function td(r,i,a){var u=r.tag;if(u===5||u===6)r=r.stateNode,i?a.insertBefore(r,i):a.appendChild(r);else if(u!==4&&(r=r.child,r!==null))for(td(r,i,a),r=r.sibling;r!==null;)td(r,i,a),r=r.sibling}var mt=null,vn=!1;function xr(r,i,a){for(a=a.child;a!==null;)Lg(r,i,a),a=a.sibling}function Lg(r,i,a){if(kn&&typeof kn.onCommitFiberUnmount=="function")try{kn.onCommitFiberUnmount(xa,a)}catch{}switch(a.tag){case 5:Et||ti(a,i);case 6:var u=mt,h=vn;mt=null,xr(r,i,a),mt=u,vn=h,mt!==null&&(vn?(r=mt,a=a.stateNode,r.nodeType===8?r.parentNode.removeChild(a):r.removeChild(a)):mt.removeChild(a.stateNode));break;case 18:mt!==null&&(vn?(r=mt,a=a.stateNode,r.nodeType===8?pu(r.parentNode,a):r.nodeType===1&&pu(r,a),Ki(r)):pu(mt,a.stateNode));break;case 4:u=mt,h=vn,mt=a.stateNode.containerInfo,vn=!0,xr(r,i,a),mt=u,vn=h;break;case 0:case 11:case 14:case 15:if(!Et&&(u=a.updateQueue,u!==null&&(u=u.lastEffect,u!==null))){h=u=u.next;do{var m=h,w=m.destroy;m=m.tag,w!==void 0&&((m&2)!==0||(m&4)!==0)&&Zu(a,i,w),h=h.next}while(h!==u)}xr(r,i,a);break;case 1:if(!Et&&(ti(a,i),u=a.stateNode,typeof u.componentWillUnmount=="function"))try{u.props=a.memoizedProps,u.state=a.memoizedState,u.componentWillUnmount()}catch(_){Qe(a,i,_)}xr(r,i,a);break;case 21:xr(r,i,a);break;case 22:a.mode&1?(Et=(u=Et)||a.memoizedState!==null,xr(r,i,a),Et=u):xr(r,i,a);break;default:xr(r,i,a)}}function Dg(r){var i=r.updateQueue;if(i!==null){r.updateQueue=null;var a=r.stateNode;a===null&&(a=r.stateNode=new FE),i.forEach(function(u){var h=KE.bind(null,r,u);a.has(u)||(a.add(u),u.then(h,h))})}}function xn(r,i){var a=i.deletions;if(a!==null)for(var u=0;uh&&(h=w),u&=~m}if(u=h,u=Ye()-u,u=(120>u?120:480>u?480:1080>u?1080:1920>u?1920:3e3>u?3e3:4320>u?4320:1960*UE(u/1960))-u,10r?16:r,br===null)var u=!1;else{if(r=br,br=null,dl=0,(je&6)!==0)throw Error(n(331));var h=je;for(je|=4,re=r.current;re!==null;){var m=re,w=m.child;if((re.flags&16)!==0){var _=m.deletions;if(_!==null){for(var N=0;N<_.length;N++){var B=_[N];for(re=B;re!==null;){var q=re;switch(q.tag){case 0:case 11:case 15:yo(8,q,m)}var Q=q.child;if(Q!==null)Q.return=q,re=Q;else for(;re!==null;){q=re;var H=q.sibling,ee=q.return;if(Ng(q),q===B){re=null;break}if(H!==null){H.return=ee,re=H;break}re=ee}}}var ie=m.alternate;if(ie!==null){var le=ie.child;if(le!==null){ie.child=null;do{var Xe=le.sibling;le.sibling=null,le=Xe}while(le!==null)}}re=m}}if((m.subtreeFlags&2064)!==0&&w!==null)w.return=m,re=w;else e:for(;re!==null;){if(m=re,(m.flags&2048)!==0)switch(m.tag){case 0:case 11:case 15:yo(9,m,m.return)}var I=m.sibling;if(I!==null){I.return=m.return,re=I;break e}re=m.return}}var j=r.current;for(re=j;re!==null;){w=re;var F=w.child;if((w.subtreeFlags&2064)!==0&&F!==null)F.return=w,re=F;else e:for(w=j;re!==null;){if(_=re,(_.flags&2048)!==0)try{switch(_.tag){case 0:case 11:case 15:ol(9,_)}}catch(ce){Qe(_,_.return,ce)}if(_===w){re=null;break e}var G=_.sibling;if(G!==null){G.return=_.return,re=G;break e}re=_.return}}if(je=h,gr(),kn&&typeof kn.onPostCommitFiberRoot=="function")try{kn.onPostCommitFiberRoot(xa,r)}catch{}u=!0}return u}finally{Fe=a,rn.transition=i}}return!1}function Qg(r,i,a){i=ei(a,i),i=dg(r,i,1),r=vr(r,i,1),i=At(),r!==null&&($i(r,1,i),It(r,i))}function Qe(r,i,a){if(r.tag===3)Qg(r,r,a);else for(;i!==null;){if(i.tag===3){Qg(i,r,a);break}else if(i.tag===1){var u=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(wr===null||!wr.has(u))){r=ei(a,r),r=fg(i,r,1),i=vr(i,r,1),r=At(),i!==null&&($i(i,1,r),It(i,r));break}}i=i.return}}function qE(r,i,a){var u=r.pingCache;u!==null&&u.delete(i),i=At(),r.pingedLanes|=r.suspendedLanes&a,lt===r&&(gt&a)===a&&(rt===4||rt===3&&(gt&130023424)===gt&&500>Ye()-sd?rs(r,0):rd|=a),It(r,i)}function Kg(r,i){i===0&&((r.mode&1)===0?i=1:(i=ba,ba<<=1,(ba&130023424)===0&&(ba=4194304)));var a=At();r=Qn(r,i),r!==null&&($i(r,i,a),It(r,a))}function QE(r){var i=r.memoizedState,a=0;i!==null&&(a=i.retryLane),Kg(r,a)}function KE(r,i){var a=0;switch(r.tag){case 13:var u=r.stateNode,h=r.memoizedState;h!==null&&(a=h.retryLane);break;case 19:u=r.stateNode;break;default:throw Error(n(314))}u!==null&&u.delete(i),Kg(r,a)}var Gg;Gg=function(r,i,a){if(r!==null)if(r.memoizedProps!==i.pendingProps||jt.current)Dt=!0;else{if((r.lanes&a)===0&&(i.flags&128)===0)return Dt=!1,DE(r,i,a);Dt=(r.flags&131072)!==0}else Dt=!1,$e&&(i.flags&1048576)!==0&&Pm(i,$a,i.index);switch(i.lanes=0,i.tag){case 2:var u=i.type;sl(r,i),r=i.pendingProps;var h=qs(i,wt.current);Zs(i,a),h=Du(null,i,u,r,h,a);var m=Mu();return i.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,Lt(u)?(m=!0,Ba(i)):m=!1,i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,Pu(i),h.updater=nl,i.stateNode=h,h._reactInternals=i,zu(i,u,r,a),i=qu(null,i,u,!0,m,a)):(i.tag=0,$e&&m&&vu(i),Rt(null,i,h,a),i=i.child),i;case 16:u=i.elementType;e:{switch(sl(r,i),r=i.pendingProps,h=u._init,u=h(u._payload),i.type=u,h=i.tag=YE(u),r=yn(u,r),h){case 0:i=Wu(null,i,u,r,a);break e;case 1:i=bg(null,i,u,r,a);break e;case 11:i=gg(null,i,u,r,a);break e;case 14:i=yg(null,i,u,yn(u.type,r),a);break e}throw Error(n(306,u,""))}return i;case 0:return u=i.type,h=i.pendingProps,h=i.elementType===u?h:yn(u,h),Wu(r,i,u,h,a);case 1:return u=i.type,h=i.pendingProps,h=i.elementType===u?h:yn(u,h),bg(r,i,u,h,a);case 3:e:{if(Sg(i),r===null)throw Error(n(387));u=i.pendingProps,m=i.memoizedState,h=m.element,Im(r,i),Ga(i,u,null,a);var w=i.memoizedState;if(u=w.element,m.isDehydrated)if(m={element:u,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},i.updateQueue.baseState=m,i.memoizedState=m,i.flags&256){h=ei(Error(n(423)),i),i=Eg(r,i,u,a,h);break e}else if(u!==h){h=ei(Error(n(424)),i),i=Eg(r,i,u,a,h);break e}else for(qt=hr(i.stateNode.containerInfo.firstChild),Wt=i,$e=!0,gn=null,a=Dm(i,null,u,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Gs(),u===h){i=Gn(r,i,a);break e}Rt(r,i,u,a)}i=i.child}return i;case 5:return Bm(i),r===null&&bu(i),u=i.type,h=i.pendingProps,m=r!==null?r.memoizedProps:null,w=h.children,fu(u,h)?w=null:m!==null&&fu(u,m)&&(i.flags|=32),wg(r,i),Rt(r,i,w,a),i.child;case 6:return r===null&&bu(i),null;case 13:return Cg(r,i,a);case 4:return Ru(i,i.stateNode.containerInfo),u=i.pendingProps,r===null?i.child=Ys(i,null,u,a):Rt(r,i,u,a),i.child;case 11:return u=i.type,h=i.pendingProps,h=i.elementType===u?h:yn(u,h),gg(r,i,u,h,a);case 7:return Rt(r,i,i.pendingProps,a),i.child;case 8:return Rt(r,i,i.pendingProps.children,a),i.child;case 12:return Rt(r,i,i.pendingProps.children,a),i.child;case 10:e:{if(u=i.type._context,h=i.pendingProps,m=i.memoizedProps,w=h.value,Be(qa,u._currentValue),u._currentValue=w,m!==null)if(mn(m.value,w)){if(m.children===h.children&&!jt.current){i=Gn(r,i,a);break e}}else for(m=i.child,m!==null&&(m.return=i);m!==null;){var _=m.dependencies;if(_!==null){w=m.child;for(var N=_.firstContext;N!==null;){if(N.context===u){if(m.tag===1){N=Kn(-1,a&-a),N.tag=2;var B=m.updateQueue;if(B!==null){B=B.shared;var q=B.pending;q===null?N.next=N:(N.next=q.next,q.next=N),B.pending=N}}m.lanes|=a,N=m.alternate,N!==null&&(N.lanes|=a),_u(m.return,a,i),_.lanes|=a;break}N=N.next}}else if(m.tag===10)w=m.type===i.type?null:m.child;else if(m.tag===18){if(w=m.return,w===null)throw Error(n(341));w.lanes|=a,_=w.alternate,_!==null&&(_.lanes|=a),_u(w,a,i),w=m.sibling}else w=m.child;if(w!==null)w.return=m;else for(w=m;w!==null;){if(w===i){w=null;break}if(m=w.sibling,m!==null){m.return=w.return,w=m;break}w=w.return}m=w}Rt(r,i,h.children,a),i=i.child}return i;case 9:return h=i.type,u=i.pendingProps.children,Zs(i,a),h=tn(h),u=u(h),i.flags|=1,Rt(r,i,u,a),i.child;case 14:return u=i.type,h=yn(u,i.pendingProps),h=yn(u.type,h),yg(r,i,u,h,a);case 15:return vg(r,i,i.type,i.pendingProps,a);case 17:return u=i.type,h=i.pendingProps,h=i.elementType===u?h:yn(u,h),sl(r,i),i.tag=1,Lt(u)?(r=!0,Ba(i)):r=!1,Zs(i,a),cg(i,u,h),zu(i,u,h,a),qu(null,i,u,!0,r,a);case 19:return _g(r,i,a);case 22:return xg(r,i,a)}throw Error(n(156,i.tag))};function Yg(r,i){return Rp(r,i)}function GE(r,i,a,u){this.tag=r,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sn(r,i,a,u){return new GE(r,i,a,u)}function fd(r){return r=r.prototype,!(!r||!r.isReactComponent)}function YE(r){if(typeof r=="function")return fd(r)?1:0;if(r!=null){if(r=r.$$typeof,r===_e)return 11;if(r===Te)return 14}return 2}function Cr(r,i){var a=r.alternate;return a===null?(a=sn(r.tag,i,r.key,r.mode),a.elementType=r.elementType,a.type=r.type,a.stateNode=r.stateNode,a.alternate=r,r.alternate=a):(a.pendingProps=i,a.type=r.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=r.flags&14680064,a.childLanes=r.childLanes,a.lanes=r.lanes,a.child=r.child,a.memoizedProps=r.memoizedProps,a.memoizedState=r.memoizedState,a.updateQueue=r.updateQueue,i=r.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=r.sibling,a.index=r.index,a.ref=r.ref,a}function ml(r,i,a,u,h,m){var w=2;if(u=r,typeof r=="function")fd(r)&&(w=1);else if(typeof r=="string")w=5;else e:switch(r){case W:return is(a.children,h,m,i);case V:w=8,h|=8;break;case Y:return r=sn(12,a,i,h|2),r.elementType=Y,r.lanes=m,r;case be:return r=sn(13,a,i,h),r.elementType=be,r.lanes=m,r;case J:return r=sn(19,a,i,h),r.elementType=J,r.lanes=m,r;case ue:return gl(a,h,m,i);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case ne:w=10;break e;case ve:w=9;break e;case _e:w=11;break e;case Te:w=14;break e;case Ce:w=16,u=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return i=sn(w,a,i,h),i.elementType=r,i.type=u,i.lanes=m,i}function is(r,i,a,u){return r=sn(7,r,u,i),r.lanes=a,r}function gl(r,i,a,u){return r=sn(22,r,u,i),r.elementType=ue,r.lanes=a,r.stateNode={isHidden:!1},r}function hd(r,i,a){return r=sn(6,r,null,i),r.lanes=a,r}function pd(r,i,a){return i=sn(4,r.children!==null?r.children:[],r.key,i),i.lanes=a,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}function XE(r,i,a,u,h){this.tag=i,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Uc(0),this.expirationTimes=Uc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Uc(0),this.identifierPrefix=u,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function md(r,i,a,u,h,m,w,_,N){return r=new XE(r,i,a,_,N),i===1?(i=1,m===!0&&(i|=8)):i=0,m=sn(3,null,null,i),r.current=m,m.stateNode=r,m.memoizedState={element:u,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},Pu(m),r}function ZE(r,i,a){var u=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Sd.exports=fC(),Sd.exports}var dy;function hC(){if(dy)return Cl;dy=1;var e=mx();return Cl.createRoot=e.createRoot,Cl.hydrateRoot=e.hydrateRoot,Cl}var pC=hC();const mC=eh(pC),gC=20,yC=1e6,nr={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Td=0;function vC(){return Td=(Td+1)%Number.MAX_VALUE,Td.toString()}const _d=new Map,fy=e=>{if(_d.has(e))return;const t=setTimeout(()=>{_d.delete(e),Io({type:nr.REMOVE_TOAST,toastId:e})},yC);_d.set(e,t)},xC=(e,t)=>{switch(t.type){case nr.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,gC)};case nr.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case nr.DISMISS_TOAST:{const{toastId:n}=t;return n?fy(n):e.toasts.forEach(s=>{fy(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===n||n===void 0?{...s,open:!1}:s)}}case nr.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Vl=[];let Bl={toasts:[]};function Io(e){Bl=xC(Bl,e),Vl.forEach(t=>{t(Bl)})}function wC({...e}){const t=vC(),n=o=>Io({type:nr.UPDATE_TOAST,toast:{...o,id:t}}),s=()=>Io({type:nr.DISMISS_TOAST,toastId:t});return Io({type:nr.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:o=>{o||s()}}}),{id:t,dismiss:s,update:n}}function bC(){const[e,t]=T.useState(Bl);return T.useEffect(()=>(Vl.push(t),()=>{const n=Vl.indexOf(t);n>-1&&Vl.splice(n,1)}),[e]),{...e,toast:wC,dismiss:n=>Io({type:nr.DISMISS_TOAST,toastId:n})}}var nh=mx();const SC=eh(nh);function Kt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function hy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function rh(...e){return t=>{let n=!1;const s=e.map(o=>{const l=hy(o,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o{var S;const{scope:x,children:E,...P}=y,C=((S=x==null?void 0:x[e])==null?void 0:S[f])||d,b=T.useMemo(()=>P,Object.values(P));return v.jsx(C.Provider,{value:b,children:E})};p.displayName=l+"Provider";function g(y,x){var C;const E=((C=x==null?void 0:x[e])==null?void 0:C[f])||d,P=T.useContext(E);if(P)return P;if(c!==void 0)return c;throw new Error(`\`${y}\` must be used within \`${l}\``)}return[p,g]}const o=()=>{const l=n.map(c=>T.createContext(c));return function(d){const f=(d==null?void 0:d[e])||l;return T.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return o.scopeName=e,[s,EC(o,...t)]}function EC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const s=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const c=s.reduce((d,{useScope:f,scopeName:p})=>{const y=f(l)[`__scope${p}`];return{...d,...y}},{});return T.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function py(e){const t=CC(e),n=T.forwardRef((s,o)=>{const{children:l,...c}=s,d=T.Children.toArray(l),f=d.find(_C);if(f){const p=f.props.children,g=d.map(y=>y===f?T.Children.count(p)>1?T.Children.only(null):T.isValidElement(p)?p.props.children:null:y);return v.jsx(t,{...c,ref:o,children:T.isValidElement(p)?T.cloneElement(p,void 0,g):null})}return v.jsx(t,{...c,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function CC(e){const t=T.forwardRef((n,s)=>{const{children:o,...l}=n;if(T.isValidElement(o)){const c=PC(o),d=kC(l,o.props);return o.type!==T.Fragment&&(d.ref=s?rh(s,c):c),T.cloneElement(o,d)}return T.Children.count(o)>1?T.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var TC=Symbol("radix.slottable");function _C(e){return T.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===TC}function kC(e,t){const n={...t};for(const s in t){const o=e[s],l=t[s];/^on[A-Z]/.test(s)?o&&l?n[s]=(...d)=>{const f=l(...d);return o(...d),f}:o&&(n[s]=o):s==="style"?n[s]={...o,...l}:s==="className"&&(n[s]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function PC(e){var s,o;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function RC(e){const t=e+"CollectionProvider",[n,s]=gx(t),[o,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=C=>{const{scope:b,children:S}=C,R=Pr.useRef(null),k=Pr.useRef(new Map).current;return v.jsx(o,{scope:b,itemMap:k,collectionRef:R,children:S})};c.displayName=t;const d=e+"CollectionSlot",f=py(d),p=Pr.forwardRef((C,b)=>{const{scope:S,children:R}=C,k=l(d,S),A=ks(b,k.collectionRef);return v.jsx(f,{ref:A,children:R})});p.displayName=d;const g=e+"CollectionItemSlot",y="data-radix-collection-item",x=py(g),E=Pr.forwardRef((C,b)=>{const{scope:S,children:R,...k}=C,A=Pr.useRef(null),M=ks(b,A),U=l(g,S);return Pr.useEffect(()=>(U.itemMap.set(A,{ref:A,...k}),()=>void U.itemMap.delete(A))),v.jsx(x,{[y]:"",ref:M,children:R})});E.displayName=g;function P(C){const b=l(e+"CollectionConsumer",C);return Pr.useCallback(()=>{const R=b.collectionRef.current;if(!R)return[];const k=Array.from(R.querySelectorAll(`[${y}]`));return Array.from(b.itemMap.values()).sort((U,W)=>k.indexOf(U.ref.current)-k.indexOf(W.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:c,Slot:p,ItemSlot:E},P,s]}function AC(e){const t=NC(e),n=T.forwardRef((s,o)=>{const{children:l,...c}=s,d=T.Children.toArray(l),f=d.find(jC);if(f){const p=f.props.children,g=d.map(y=>y===f?T.Children.count(p)>1?T.Children.only(null):T.isValidElement(p)?p.props.children:null:y);return v.jsx(t,{...c,ref:o,children:T.isValidElement(p)?T.cloneElement(p,void 0,g):null})}return v.jsx(t,{...c,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function NC(e){const t=T.forwardRef((n,s)=>{const{children:o,...l}=n;if(T.isValidElement(o)){const c=DC(o),d=LC(l,o.props);return o.type!==T.Fragment&&(d.ref=s?rh(s,c):c),T.cloneElement(o,d)}return T.Children.count(o)>1?T.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var OC=Symbol("radix.slottable");function jC(e){return T.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===OC}function LC(e,t){const n={...t};for(const s in t){const o=e[s],l=t[s];/^on[A-Z]/.test(s)?o&&l?n[s]=(...d)=>{const f=l(...d);return o(...d),f}:o&&(n[s]=o):s==="style"?n[s]={...o,...l}:s==="className"&&(n[s]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function DC(e){var s,o;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var MC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Un=MC.reduce((e,t)=>{const n=AC(`Primitive.${t}`),s=T.forwardRef((o,l)=>{const{asChild:c,...d}=o,f=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(f,{...d,ref:l})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function yx(e,t){e&&nh.flushSync(()=>e.dispatchEvent(t))}function Ps(e){const t=T.useRef(e);return T.useEffect(()=>{t.current=e}),T.useMemo(()=>(...n)=>{var s;return(s=t.current)==null?void 0:s.call(t,...n)},[])}function IC(e,t=globalThis==null?void 0:globalThis.document){const n=Ps(e);T.useEffect(()=>{const s=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[n,t])}var FC="DismissableLayer",nf="dismissableLayer.update",VC="dismissableLayer.pointerDownOutside",BC="dismissableLayer.focusOutside",my,vx=T.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xx=T.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:c,onDismiss:d,...f}=e,p=T.useContext(vx),[g,y]=T.useState(null),x=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,E]=T.useState({}),P=ks(t,W=>y(W)),C=Array.from(p.layers),[b]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),S=C.indexOf(b),R=g?C.indexOf(g):-1,k=p.layersWithOutsidePointerEventsDisabled.size>0,A=R>=S,M=zC(W=>{const V=W.target,Y=[...p.branches].some(ne=>ne.contains(V));!A||Y||(o==null||o(W),c==null||c(W),W.defaultPrevented||d==null||d())},x),U=$C(W=>{const V=W.target;[...p.branches].some(ne=>ne.contains(V))||(l==null||l(W),c==null||c(W),W.defaultPrevented||d==null||d())},x);return IC(W=>{R===p.layers.size-1&&(s==null||s(W),!W.defaultPrevented&&d&&(W.preventDefault(),d()))},x),T.useEffect(()=>{if(g)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(my=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(g)),p.layers.add(g),gy(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=my)}},[g,x,n,p]),T.useEffect(()=>()=>{g&&(p.layers.delete(g),p.layersWithOutsidePointerEventsDisabled.delete(g),gy())},[g,p]),T.useEffect(()=>{const W=()=>E({});return document.addEventListener(nf,W),()=>document.removeEventListener(nf,W)},[]),v.jsx(Un.div,{...f,ref:P,style:{pointerEvents:k?A?"auto":"none":void 0,...e.style},onFocusCapture:Kt(e.onFocusCapture,U.onFocusCapture),onBlurCapture:Kt(e.onBlurCapture,U.onBlurCapture),onPointerDownCapture:Kt(e.onPointerDownCapture,M.onPointerDownCapture)})});xx.displayName=FC;var UC="DismissableLayerBranch",wx=T.forwardRef((e,t)=>{const n=T.useContext(vx),s=T.useRef(null),o=ks(t,s);return T.useEffect(()=>{const l=s.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),v.jsx(Un.div,{...e,ref:o})});wx.displayName=UC;function zC(e,t=globalThis==null?void 0:globalThis.document){const n=Ps(e),s=T.useRef(!1),o=T.useRef(()=>{});return T.useEffect(()=>{const l=d=>{if(d.target&&!s.current){let f=function(){bx(VC,n,p,{discrete:!0})};const p={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);s.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",l),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>s.current=!0}}function $C(e,t=globalThis==null?void 0:globalThis.document){const n=Ps(e),s=T.useRef(!1);return T.useEffect(()=>{const o=l=>{l.target&&!s.current&&bx(BC,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function gy(){const e=new CustomEvent(nf);document.dispatchEvent(e)}function bx(e,t,n,{discrete:s}){const o=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),s?yx(o,l):o.dispatchEvent(l)}var HC=xx,WC=wx,Wo=globalThis!=null&&globalThis.document?T.useLayoutEffect:()=>{},qC="Portal",Sx=T.forwardRef((e,t)=>{var d;const{container:n,...s}=e,[o,l]=T.useState(!1);Wo(()=>l(!0),[]);const c=n||o&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return c?SC.createPortal(v.jsx(Un.div,{...s,ref:t}),c):null});Sx.displayName=qC;function QC(e,t){return T.useReducer((n,s)=>t[n][s]??n,e)}var Ex=e=>{const{present:t,children:n}=e,s=KC(t),o=typeof n=="function"?n({present:s.isPresent}):T.Children.only(n),l=ks(s.ref,GC(o));return typeof n=="function"||s.isPresent?T.cloneElement(o,{ref:l}):null};Ex.displayName="Presence";function KC(e){const[t,n]=T.useState(),s=T.useRef(null),o=T.useRef(e),l=T.useRef("none"),c=e?"mounted":"unmounted",[d,f]=QC(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return T.useEffect(()=>{const p=Tl(s.current);l.current=d==="mounted"?p:"none"},[d]),Wo(()=>{const p=s.current,g=o.current;if(g!==e){const x=l.current,E=Tl(p);e?f("MOUNT"):E==="none"||(p==null?void 0:p.display)==="none"?f("UNMOUNT"):f(g&&x!==E?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),Wo(()=>{if(t){let p;const g=t.ownerDocument.defaultView??window,y=E=>{const C=Tl(s.current).includes(CSS.escape(E.animationName));if(E.target===t&&C&&(f("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",p=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},x=E=>{E.target===t&&(l.current=Tl(s.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{g.clearTimeout(p),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:T.useCallback(p=>{s.current=p?getComputedStyle(p):null,n(p)},[])}}function Tl(e){return(e==null?void 0:e.animationName)||"none"}function GC(e){var s,o;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var YC=px[" useInsertionEffect ".trim().toString()]||Wo;function XC({prop:e,defaultProp:t,onChange:n=()=>{},caller:s}){const[o,l,c]=ZC({defaultProp:t,onChange:n}),d=e!==void 0,f=d?e:o;{const g=T.useRef(e!==void 0);T.useEffect(()=>{const y=g.current;y!==d&&console.warn(`${s} is changing from ${y?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=d},[d,s])}const p=T.useCallback(g=>{var y;if(d){const x=JC(g)?g(e):g;x!==e&&((y=c.current)==null||y.call(c,x))}else l(g)},[d,e,l,c]);return[f,p]}function ZC({defaultProp:e,onChange:t}){const[n,s]=T.useState(e),o=T.useRef(n),l=T.useRef(t);return YC(()=>{l.current=t},[t]),T.useEffect(()=>{var c;o.current!==n&&((c=l.current)==null||c.call(l,n),o.current=n)},[n,o]),[n,s,l]}function JC(e){return typeof e=="function"}var eT=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),tT="VisuallyHidden",sh=T.forwardRef((e,t)=>v.jsx(Un.span,{...e,ref:t,style:{...eT,...e.style}}));sh.displayName=tT;var ih="ToastProvider",[oh,nT,rT]=RC("Toast"),[Cx]=gx("Toast",[rT]),[sT,hc]=Cx(ih),Tx=e=>{const{__scopeToast:t,label:n="Notification",duration:s=5e3,swipeDirection:o="right",swipeThreshold:l=50,children:c}=e,[d,f]=T.useState(null),[p,g]=T.useState(0),y=T.useRef(!1),x=T.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${ih}\`. Expected non-empty \`string\`.`),v.jsx(oh.Provider,{scope:t,children:v.jsx(sT,{scope:t,label:n,duration:s,swipeDirection:o,swipeThreshold:l,toastCount:p,viewport:d,onViewportChange:f,onToastAdd:T.useCallback(()=>g(E=>E+1),[]),onToastRemove:T.useCallback(()=>g(E=>E-1),[]),isFocusedToastEscapeKeyDownRef:y,isClosePausedRef:x,children:c})})};Tx.displayName=ih;var _x="ToastViewport",iT=["F8"],rf="toast.viewportPause",sf="toast.viewportResume",kx=T.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:s=iT,label:o="Notifications ({hotkey})",...l}=e,c=hc(_x,n),d=nT(n),f=T.useRef(null),p=T.useRef(null),g=T.useRef(null),y=T.useRef(null),x=ks(t,y,c.onViewportChange),E=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=c.toastCount>0;T.useEffect(()=>{const b=S=>{var k;s.length!==0&&s.every(A=>S[A]||S.code===A)&&((k=y.current)==null||k.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[s]),T.useEffect(()=>{const b=f.current,S=y.current;if(P&&b&&S){const R=()=>{if(!c.isClosePausedRef.current){const U=new CustomEvent(rf);S.dispatchEvent(U),c.isClosePausedRef.current=!0}},k=()=>{if(c.isClosePausedRef.current){const U=new CustomEvent(sf);S.dispatchEvent(U),c.isClosePausedRef.current=!1}},A=U=>{!b.contains(U.relatedTarget)&&k()},M=()=>{b.contains(document.activeElement)||k()};return b.addEventListener("focusin",R),b.addEventListener("focusout",A),b.addEventListener("pointermove",R),b.addEventListener("pointerleave",M),window.addEventListener("blur",R),window.addEventListener("focus",k),()=>{b.removeEventListener("focusin",R),b.removeEventListener("focusout",A),b.removeEventListener("pointermove",R),b.removeEventListener("pointerleave",M),window.removeEventListener("blur",R),window.removeEventListener("focus",k)}}},[P,c.isClosePausedRef]);const C=T.useCallback(({tabbingDirection:b})=>{const R=d().map(k=>{const A=k.ref.current,M=[A,...vT(A)];return b==="forwards"?M:M.reverse()});return(b==="forwards"?R.reverse():R).flat()},[d]);return T.useEffect(()=>{const b=y.current;if(b){const S=R=>{var M,U,W;const k=R.altKey||R.ctrlKey||R.metaKey;if(R.key==="Tab"&&!k){const V=document.activeElement,Y=R.shiftKey;if(R.target===b&&Y){(M=p.current)==null||M.focus();return}const _e=C({tabbingDirection:Y?"backwards":"forwards"}),be=_e.findIndex(J=>J===V);kd(_e.slice(be+1))?R.preventDefault():Y?(U=p.current)==null||U.focus():(W=g.current)==null||W.focus()}};return b.addEventListener("keydown",S),()=>b.removeEventListener("keydown",S)}},[d,C]),v.jsxs(WC,{ref:f,role:"region","aria-label":o.replace("{hotkey}",E),tabIndex:-1,style:{pointerEvents:P?void 0:"none"},children:[P&&v.jsx(of,{ref:p,onFocusFromOutsideViewport:()=>{const b=C({tabbingDirection:"forwards"});kd(b)}}),v.jsx(oh.Slot,{scope:n,children:v.jsx(Un.ol,{tabIndex:-1,...l,ref:x})}),P&&v.jsx(of,{ref:g,onFocusFromOutsideViewport:()=>{const b=C({tabbingDirection:"backwards"});kd(b)}})]})});kx.displayName=_x;var Px="ToastFocusProxy",of=T.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:s,...o}=e,l=hc(Px,n);return v.jsx(sh,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:c=>{var p;const d=c.relatedTarget;!((p=l.viewport)!=null&&p.contains(d))&&s()}})});of.displayName=Px;var sa="Toast",oT="toast.swipeStart",aT="toast.swipeMove",lT="toast.swipeCancel",cT="toast.swipeEnd",Rx=T.forwardRef((e,t)=>{const{forceMount:n,open:s,defaultOpen:o,onOpenChange:l,...c}=e,[d,f]=XC({prop:s,defaultProp:o??!0,onChange:l,caller:sa});return v.jsx(Ex,{present:n||d,children:v.jsx(fT,{open:d,...c,ref:t,onClose:()=>f(!1),onPause:Ps(e.onPause),onResume:Ps(e.onResume),onSwipeStart:Kt(e.onSwipeStart,p=>{p.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Kt(e.onSwipeMove,p=>{const{x:g,y}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","move"),p.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${g}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${y}px`)}),onSwipeCancel:Kt(e.onSwipeCancel,p=>{p.currentTarget.setAttribute("data-swipe","cancel"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Kt(e.onSwipeEnd,p=>{const{x:g,y}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","end"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${g}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${y}px`),f(!1)})})})});Rx.displayName=sa;var[uT,dT]=Cx(sa,{onClose(){}}),fT=T.forwardRef((e,t)=>{const{__scopeToast:n,type:s="foreground",duration:o,open:l,onClose:c,onEscapeKeyDown:d,onPause:f,onResume:p,onSwipeStart:g,onSwipeMove:y,onSwipeCancel:x,onSwipeEnd:E,...P}=e,C=hc(sa,n),[b,S]=T.useState(null),R=ks(t,J=>S(J)),k=T.useRef(null),A=T.useRef(null),M=o||C.duration,U=T.useRef(0),W=T.useRef(M),V=T.useRef(0),{onToastAdd:Y,onToastRemove:ne}=C,ve=Ps(()=>{var Te;(b==null?void 0:b.contains(document.activeElement))&&((Te=C.viewport)==null||Te.focus()),c()}),_e=T.useCallback(J=>{!J||J===1/0||(window.clearTimeout(V.current),U.current=new Date().getTime(),V.current=window.setTimeout(ve,J))},[ve]);T.useEffect(()=>{const J=C.viewport;if(J){const Te=()=>{_e(W.current),p==null||p()},Ce=()=>{const ue=new Date().getTime()-U.current;W.current=W.current-ue,window.clearTimeout(V.current),f==null||f()};return J.addEventListener(rf,Ce),J.addEventListener(sf,Te),()=>{J.removeEventListener(rf,Ce),J.removeEventListener(sf,Te)}}},[C.viewport,M,f,p,_e]),T.useEffect(()=>{l&&!C.isClosePausedRef.current&&_e(M)},[l,M,C.isClosePausedRef,_e]),T.useEffect(()=>(Y(),()=>ne()),[Y,ne]);const be=T.useMemo(()=>b?Mx(b):null,[b]);return C.viewport?v.jsxs(v.Fragment,{children:[be&&v.jsx(hT,{__scopeToast:n,role:"status","aria-live":s==="foreground"?"assertive":"polite",children:be}),v.jsx(uT,{scope:n,onClose:ve,children:nh.createPortal(v.jsx(oh.ItemSlot,{scope:n,children:v.jsx(HC,{asChild:!0,onEscapeKeyDown:Kt(d,()=>{C.isFocusedToastEscapeKeyDownRef.current||ve(),C.isFocusedToastEscapeKeyDownRef.current=!1}),children:v.jsx(Un.li,{tabIndex:0,"data-state":l?"open":"closed","data-swipe-direction":C.swipeDirection,...P,ref:R,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Kt(e.onKeyDown,J=>{J.key==="Escape"&&(d==null||d(J.nativeEvent),J.nativeEvent.defaultPrevented||(C.isFocusedToastEscapeKeyDownRef.current=!0,ve()))}),onPointerDown:Kt(e.onPointerDown,J=>{J.button===0&&(k.current={x:J.clientX,y:J.clientY})}),onPointerMove:Kt(e.onPointerMove,J=>{if(!k.current)return;const Te=J.clientX-k.current.x,Ce=J.clientY-k.current.y,ue=!!A.current,K=["left","right"].includes(C.swipeDirection),se=["left","up"].includes(C.swipeDirection)?Math.min:Math.max,z=K?se(0,Te):0,L=K?0:se(0,Ce),$=J.pointerType==="touch"?10:2,de={x:z,y:L},ge={originalEvent:J,delta:de};ue?(A.current=de,_l(aT,y,ge,{discrete:!1})):yy(de,C.swipeDirection,$)?(A.current=de,_l(oT,g,ge,{discrete:!1}),J.target.setPointerCapture(J.pointerId)):(Math.abs(Te)>$||Math.abs(Ce)>$)&&(k.current=null)}),onPointerUp:Kt(e.onPointerUp,J=>{const Te=A.current,Ce=J.target;if(Ce.hasPointerCapture(J.pointerId)&&Ce.releasePointerCapture(J.pointerId),A.current=null,k.current=null,Te){const ue=J.currentTarget,K={originalEvent:J,delta:Te};yy(Te,C.swipeDirection,C.swipeThreshold)?_l(cT,E,K,{discrete:!0}):_l(lT,x,K,{discrete:!0}),ue.addEventListener("click",se=>se.preventDefault(),{once:!0})}})})})}),C.viewport)})]}):null}),hT=e=>{const{__scopeToast:t,children:n,...s}=e,o=hc(sa,t),[l,c]=T.useState(!1),[d,f]=T.useState(!1);return gT(()=>c(!0)),T.useEffect(()=>{const p=window.setTimeout(()=>f(!0),1e3);return()=>window.clearTimeout(p)},[]),d?null:v.jsx(Sx,{asChild:!0,children:v.jsx(sh,{...s,children:l&&v.jsxs(v.Fragment,{children:[o.label," ",n]})})})},pT="ToastTitle",Ax=T.forwardRef((e,t)=>{const{__scopeToast:n,...s}=e;return v.jsx(Un.div,{...s,ref:t})});Ax.displayName=pT;var mT="ToastDescription",Nx=T.forwardRef((e,t)=>{const{__scopeToast:n,...s}=e;return v.jsx(Un.div,{...s,ref:t})});Nx.displayName=mT;var Ox="ToastAction",jx=T.forwardRef((e,t)=>{const{altText:n,...s}=e;return n.trim()?v.jsx(Dx,{altText:n,asChild:!0,children:v.jsx(ah,{...s,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ox}\`. Expected non-empty \`string\`.`),null)});jx.displayName=Ox;var Lx="ToastClose",ah=T.forwardRef((e,t)=>{const{__scopeToast:n,...s}=e,o=dT(Lx,n);return v.jsx(Dx,{asChild:!0,children:v.jsx(Un.button,{type:"button",...s,ref:t,onClick:Kt(e.onClick,o.onClose)})})});ah.displayName=Lx;var Dx=T.forwardRef((e,t)=>{const{__scopeToast:n,altText:s,...o}=e;return v.jsx(Un.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...o,ref:t})});function Mx(e){const t=[];return Array.from(e.childNodes).forEach(s=>{if(s.nodeType===s.TEXT_NODE&&s.textContent&&t.push(s.textContent),yT(s)){const o=s.ariaHidden||s.hidden||s.style.display==="none",l=s.dataset.radixToastAnnounceExclude==="";if(!o)if(l){const c=s.dataset.radixToastAnnounceAlt;c&&t.push(c)}else t.push(...Mx(s))}}),t}function _l(e,t,n,{discrete:s}){const o=n.originalEvent.currentTarget,l=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),s?yx(o,l):o.dispatchEvent(l)}var yy=(e,t,n=0)=>{const s=Math.abs(e.x),o=Math.abs(e.y),l=s>o;return t==="left"||t==="right"?l&&s>n:!l&&o>n};function gT(e=()=>{}){const t=Ps(e);Wo(()=>{let n=0,s=0;return n=window.requestAnimationFrame(()=>s=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(s)}},[t])}function yT(e){return e.nodeType===e.ELEMENT_NODE}function vT(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const o=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||o?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function kd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var xT=Tx,Ix=kx,Fx=Rx,Vx=Ax,Bx=Nx,Ux=jx,zx=ah;function $x(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,xy=Hx,wT=(e,t)=>n=>{var s;if((t==null?void 0:t.variants)==null)return xy(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:l}=t,c=Object.keys(o).map(p=>{const g=n==null?void 0:n[p],y=l==null?void 0:l[p];if(g===null)return null;const x=vy(g)||vy(y);return o[p][x]}),d=n&&Object.entries(n).reduce((p,g)=>{let[y,x]=g;return x===void 0||(p[y]=x),p},{}),f=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((p,g)=>{let{class:y,className:x,...E}=g;return Object.entries(E).every(P=>{let[C,b]=P;return Array.isArray(b)?b.includes({...l,...d}[C]):{...l,...d}[C]===b})?[...p,y,x]:p},[]);return xy(e,c,f,n==null?void 0:n.class,n==null?void 0:n.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Wx=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var ST={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ET=T.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:o="",children:l,iconNode:c,...d},f)=>T.createElement("svg",{ref:f,...ST,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:Wx("lucide",o),...d},[...c.map(([p,g])=>T.createElement(p,g)),...Array.isArray(l)?l:[l]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ft=(e,t)=>{const n=T.forwardRef(({className:s,...o},l)=>T.createElement(ET,{ref:l,iconNode:t,className:Wx(`lucide-${bT(e)}`,s),...o}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const CT=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],qx=ft("ArrowRight",CT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const TT=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]],_T=ft("Building",TT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kT=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Qx=ft("Check",kT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const PT=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Kx=ft("ChevronDown",PT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const RT=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],AT=ft("CircleCheckBig",RT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const NT=[["path",{d:"M4 9a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h4a1 1 0 0 1 1 1v4a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-4a1 1 0 0 1 1-1h4a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2h-4a1 1 0 0 1-1-1V4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4a1 1 0 0 1-1 1z",key:"1xbrqy"}]],OT=ft("Cross",NT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jT=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],lh=ft("Download",jT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const LT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],DT=ft("Globe",LT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const MT=[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]],IT=ft("Linkedin",MT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const FT=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],VT=ft("Menu",FT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const BT=[["path",{d:"M7 19H4.815a1.83 1.83 0 0 1-1.57-.881 1.785 1.785 0 0 1-.004-1.784L7.196 9.5",key:"x6z5xu"}],["path",{d:"M11 19h8.203a1.83 1.83 0 0 0 1.556-.89 1.784 1.784 0 0 0 0-1.775l-1.226-2.12",key:"1x4zh5"}],["path",{d:"m14 16-3 3 3 3",key:"f6jyew"}],["path",{d:"M8.293 13.596 7.196 9.5 3.1 10.598",key:"wf1obh"}],["path",{d:"m9.344 5.811 1.093-1.892A1.83 1.83 0 0 1 11.985 3a1.784 1.784 0 0 1 1.546.888l3.943 6.843",key:"9tzpgr"}],["path",{d:"m13.378 9.633 4.096 1.098 1.097-4.096",key:"1oe83g"}]],UT=ft("Recycle",BT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const zT=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],$T=ft("ShieldCheck",zT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const HT=[["path",{d:"m10 20-1.25-2.5L6 18",key:"18frcb"}],["path",{d:"M10 4 8.75 6.5 6 6",key:"7mghy3"}],["path",{d:"m14 20 1.25-2.5L18 18",key:"1chtki"}],["path",{d:"m14 4 1.25 2.5L18 6",key:"1b4wsy"}],["path",{d:"m17 21-3-6h-4",key:"15hhxa"}],["path",{d:"m17 3-3 6 1.5 3",key:"11697g"}],["path",{d:"M2 12h6.5L10 9",key:"kv9z4n"}],["path",{d:"m20 10-1.5 2 1.5 2",key:"1swlpi"}],["path",{d:"M22 12h-6.5L14 15",key:"1mxi28"}],["path",{d:"m4 10 1.5 2L4 14",key:"k9enpj"}],["path",{d:"m7 21 3-6-1.5-3",key:"j8hb9u"}],["path",{d:"m7 3 3 6h4",key:"1otusx"}]],WT=ft("Snowflake",HT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const qT=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],QT=ft("Sun",qT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const KT=[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]],GT=ft("Thermometer",KT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const YT=[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]],XT=ft("Twitter",YT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ZT=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Gx=ft("X",ZT);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const JT=[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]],e_=ft("Youtube",JT),t_=(e,t)=>{const n=new Array(e.length+t.length);for(let s=0;s({classGroupId:e,validator:t}),Yx=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Jl="-",wy=[],r_="arbitrary..",s_=e=>{const t=o_(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return i_(c);const d=c.split(Jl),f=d[0]===""&&d.length>1?1:0;return Xx(d,f,t)},getConflictingClassGroupIds:(c,d)=>{if(d){const f=s[c],p=n[c];return f?p?t_(p,f):f:p||wy}return n[c]||wy}}},Xx=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],l=n.nextPart.get(o);if(l){const p=Xx(e,t+1,l);if(p)return p}const c=n.validators;if(c===null)return;const d=t===0?e.join(Jl):e.slice(t).join(Jl),f=c.length;for(let p=0;pe.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),s=t.slice(0,n);return s?r_+s:void 0})(),o_=e=>{const{theme:t,classGroups:n}=e;return a_(n,t)},a_=(e,t)=>{const n=Yx();for(const s in e){const o=e[s];ch(o,n,s,t)}return n},ch=(e,t,n,s)=>{const o=e.length;for(let l=0;l{if(typeof e=="string"){c_(e,t,n);return}if(typeof e=="function"){u_(e,t,n,s);return}d_(e,t,n,s)},c_=(e,t,n)=>{const s=e===""?t:Zx(t,e);s.classGroupId=n},u_=(e,t,n,s)=>{if(f_(e)){ch(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(n_(n,e))},d_=(e,t,n,s)=>{const o=Object.entries(e),l=o.length;for(let c=0;c{let n=e;const s=t.split(Jl),o=s.length;for(let l=0;l"isThemeGetter"in e&&e.isThemeGetter===!0,h_=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),s=Object.create(null);const o=(l,c)=>{n[l]=c,t++,t>e&&(t=0,s=n,n=Object.create(null))};return{get(l){let c=n[l];if(c!==void 0)return c;if((c=s[l])!==void 0)return o(l,c),c},set(l,c){l in n?n[l]=c:o(l,c)}}},af="!",by=":",p_=[],Sy=(e,t,n,s,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:o}),m_=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=o=>{const l=[];let c=0,d=0,f=0,p;const g=o.length;for(let C=0;Cf?p-f:void 0;return Sy(l,E,x,P)};if(t){const o=t+by,l=s;s=c=>c.startsWith(o)?l(c.slice(o.length)):Sy(p_,!1,c,void 0,!0)}if(n){const o=s;s=l=>n({className:l,parseClassName:o})}return s},g_=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,s)=>{t.set(n,1e6+s)}),n=>{const s=[];let o=[];for(let l=0;l0&&(o.sort(),s.push(...o),o=[]),s.push(c)):o.push(c)}return o.length>0&&(o.sort(),s.push(...o)),s}},y_=e=>({cache:h_(e.cacheSize),parseClassName:m_(e),sortModifiers:g_(e),...s_(e)}),v_=/\s+/,x_=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:o,sortModifiers:l}=t,c=[],d=e.trim().split(v_);let f="";for(let p=d.length-1;p>=0;p-=1){const g=d[p],{isExternal:y,modifiers:x,hasImportantModifier:E,baseClassName:P,maybePostfixModifierPosition:C}=n(g);if(y){f=g+(f.length>0?" "+f:f);continue}let b=!!C,S=s(b?P.substring(0,C):P);if(!S){if(!b){f=g+(f.length>0?" "+f:f);continue}if(S=s(P),!S){f=g+(f.length>0?" "+f:f);continue}b=!1}const R=x.length===0?"":x.length===1?x[0]:l(x).join(":"),k=E?R+af:R,A=k+S;if(c.indexOf(A)>-1)continue;c.push(A);const M=o(S,b);for(let U=0;U0?" "+f:f)}return f},w_=(...e)=>{let t=0,n,s,o="";for(;t{if(typeof e=="string")return e;let t,n="";for(let s=0;s{let n,s,o,l;const c=f=>{const p=t.reduce((g,y)=>y(g),e());return n=y_(p),s=n.cache.get,o=n.cache.set,l=d,d(f)},d=f=>{const p=s(f);if(p)return p;const g=x_(f,n);return o(f,g),g};return l=c,(...f)=>l(w_(...f))},S_=[],st=e=>{const t=n=>n[e]||S_;return t.isThemeGetter=!0,t},ew=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,tw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,E_=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,C_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,T_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,__=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,k_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,P_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_r=e=>E_.test(e),ke=e=>!!e&&!Number.isNaN(Number(e)),kr=e=>!!e&&Number.isInteger(Number(e)),Pd=e=>e.endsWith("%")&&ke(e.slice(0,-1)),Xn=e=>C_.test(e),nw=()=>!0,R_=e=>T_.test(e)&&!__.test(e),uh=()=>!1,A_=e=>k_.test(e),N_=e=>P_.test(e),O_=e=>!oe(e)&&!ae(e),j_=e=>Hr(e,iw,uh),oe=e=>ew.test(e),os=e=>Hr(e,ow,R_),Ey=e=>Hr(e,U_,ke),L_=e=>Hr(e,lw,nw),D_=e=>Hr(e,aw,uh),Cy=e=>Hr(e,rw,uh),M_=e=>Hr(e,sw,N_),kl=e=>Hr(e,cw,A_),ae=e=>tw.test(e),Eo=e=>js(e,ow),I_=e=>js(e,aw),Ty=e=>js(e,rw),F_=e=>js(e,iw),V_=e=>js(e,sw),Pl=e=>js(e,cw,!0),B_=e=>js(e,lw,!0),Hr=(e,t,n)=>{const s=ew.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},js=(e,t,n=!1)=>{const s=tw.exec(e);return s?s[1]?t(s[1]):n:!1},rw=e=>e==="position"||e==="percentage",sw=e=>e==="image"||e==="url",iw=e=>e==="length"||e==="size"||e==="bg-size",ow=e=>e==="length",U_=e=>e==="number",aw=e=>e==="family-name",lw=e=>e==="number"||e==="weight",cw=e=>e==="shadow",z_=()=>{const e=st("color"),t=st("font"),n=st("text"),s=st("font-weight"),o=st("tracking"),l=st("leading"),c=st("breakpoint"),d=st("container"),f=st("spacing"),p=st("radius"),g=st("shadow"),y=st("inset-shadow"),x=st("text-shadow"),E=st("drop-shadow"),P=st("blur"),C=st("perspective"),b=st("aspect"),S=st("ease"),R=st("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...A(),ae,oe],U=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto","contain","none"],V=()=>[ae,oe,f],Y=()=>[_r,"full","auto",...V()],ne=()=>[kr,"none","subgrid",ae,oe],ve=()=>["auto",{span:["full",kr,ae,oe]},kr,ae,oe],_e=()=>[kr,"auto",ae,oe],be=()=>["auto","min","max","fr",ae,oe],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Te=()=>["start","end","center","stretch","center-safe","end-safe"],Ce=()=>["auto",...V()],ue=()=>[_r,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...V()],K=()=>[_r,"screen","full","dvw","lvw","svw","min","max","fit",...V()],se=()=>[_r,"screen","full","lh","dvh","lvh","svh","min","max","fit",...V()],z=()=>[e,ae,oe],L=()=>[...A(),Ty,Cy,{position:[ae,oe]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],de=()=>["auto","cover","contain",F_,j_,{size:[ae,oe]}],ge=()=>[Pd,Eo,os],pe=()=>["","none","full",p,ae,oe],X=()=>["",ke,Eo,os],Se=()=>["solid","dashed","dotted","double"],Re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],we=()=>[ke,Pd,Ty,Cy],ot=()=>["","none",P,ae,oe],Yt=()=>["none",ke,ae,oe],ht=()=>["none",ke,ae,oe],dn=()=>[ke,ae,oe],Xt=()=>[_r,"full",...V()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Xn],breakpoint:[Xn],color:[nw],container:[Xn],"drop-shadow":[Xn],ease:["in","out","in-out"],font:[O_],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Xn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Xn],shadow:[Xn],spacing:["px",ke],text:[Xn],"text-shadow":[Xn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_r,oe,ae,b]}],container:["container"],columns:[{columns:[ke,oe,ae,d]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:M()}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{"inset-s":Y(),start:Y()}],end:[{"inset-e":Y(),end:Y()}],"inset-bs":[{"inset-bs":Y()}],"inset-be":[{"inset-be":Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[kr,"auto",ae,oe]}],basis:[{basis:[_r,"full","auto",d,...V()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,_r,"auto","initial","none",oe]}],grow:[{grow:["",ke,ae,oe]}],shrink:[{shrink:["",ke,ae,oe]}],order:[{order:[kr,"first","last","none",ae,oe]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:ve()}],"col-start":[{"col-start":_e()}],"col-end":[{"col-end":_e()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:ve()}],"row-start":[{"row-start":_e()}],"row-end":[{"row-end":_e()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":be()}],"auto-rows":[{"auto-rows":be()}],gap:[{gap:V()}],"gap-x":[{"gap-x":V()}],"gap-y":[{"gap-y":V()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...Te(),"normal"]}],"justify-self":[{"justify-self":["auto",...Te()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...Te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Te(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...Te(),"baseline"]}],"place-self":[{"place-self":["auto",...Te()]}],p:[{p:V()}],px:[{px:V()}],py:[{py:V()}],ps:[{ps:V()}],pe:[{pe:V()}],pbs:[{pbs:V()}],pbe:[{pbe:V()}],pt:[{pt:V()}],pr:[{pr:V()}],pb:[{pb:V()}],pl:[{pl:V()}],m:[{m:Ce()}],mx:[{mx:Ce()}],my:[{my:Ce()}],ms:[{ms:Ce()}],me:[{me:Ce()}],mbs:[{mbs:Ce()}],mbe:[{mbe:Ce()}],mt:[{mt:Ce()}],mr:[{mr:Ce()}],mb:[{mb:Ce()}],ml:[{ml:Ce()}],"space-x":[{"space-x":V()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":V()}],"space-y-reverse":["space-y-reverse"],size:[{size:ue()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"block-size":[{block:["auto",...se()]}],"min-block-size":[{"min-block":["auto",...se()]}],"max-block-size":[{"max-block":["none",...se()]}],w:[{w:[d,"screen",...ue()]}],"min-w":[{"min-w":[d,"screen","none",...ue()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[c]},...ue()]}],h:[{h:["screen","lh",...ue()]}],"min-h":[{"min-h":["screen","lh","none",...ue()]}],"max-h":[{"max-h":["screen","lh",...ue()]}],"font-size":[{text:["base",n,Eo,os]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,B_,L_]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Pd,oe]}],"font-family":[{font:[I_,D_,t]}],"font-features":[{"font-features":[oe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ae,oe]}],"line-clamp":[{"line-clamp":[ke,"none",ae,Ey]}],leading:[{leading:[l,...V()]}],"list-image":[{"list-image":["none",ae,oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ae,oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",ae,os]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[ke,"auto",ae,oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae,oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae,oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:de()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},kr,ae,oe],radial:["",ae,oe],conic:[kr,ae,oe]},V_,M_]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:ge()}],"gradient-via-pos":[{via:ge()}],"gradient-to-pos":[{to:ge()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:pe()}],"rounded-s":[{"rounded-s":pe()}],"rounded-e":[{"rounded-e":pe()}],"rounded-t":[{"rounded-t":pe()}],"rounded-r":[{"rounded-r":pe()}],"rounded-b":[{"rounded-b":pe()}],"rounded-l":[{"rounded-l":pe()}],"rounded-ss":[{"rounded-ss":pe()}],"rounded-se":[{"rounded-se":pe()}],"rounded-ee":[{"rounded-ee":pe()}],"rounded-es":[{"rounded-es":pe()}],"rounded-tl":[{"rounded-tl":pe()}],"rounded-tr":[{"rounded-tr":pe()}],"rounded-br":[{"rounded-br":pe()}],"rounded-bl":[{"rounded-bl":pe()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Se(),"hidden","none"]}],"divide-style":[{divide:[...Se(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...Se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,ae,oe]}],"outline-w":[{outline:["",ke,Eo,os]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",g,Pl,kl]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",y,Pl,kl]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[ke,os]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",x,Pl,kl]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[ke,ae,oe]}],"mix-blend":[{"mix-blend":[...Re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":we()}],"mask-image-linear-to-pos":[{"mask-linear-to":we()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":we()}],"mask-image-t-to-pos":[{"mask-t-to":we()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":we()}],"mask-image-r-to-pos":[{"mask-r-to":we()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":we()}],"mask-image-b-to-pos":[{"mask-b-to":we()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":we()}],"mask-image-l-to-pos":[{"mask-l-to":we()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":we()}],"mask-image-x-to-pos":[{"mask-x-to":we()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":we()}],"mask-image-y-to-pos":[{"mask-y-to":we()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[ae,oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":we()}],"mask-image-radial-to-pos":[{"mask-radial-to":we()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":we()}],"mask-image-conic-to-pos":[{"mask-conic-to":we()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:de()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ae,oe]}],filter:[{filter:["","none",ae,oe]}],blur:[{blur:ot()}],brightness:[{brightness:[ke,ae,oe]}],contrast:[{contrast:[ke,ae,oe]}],"drop-shadow":[{"drop-shadow":["","none",E,Pl,kl]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",ke,ae,oe]}],"hue-rotate":[{"hue-rotate":[ke,ae,oe]}],invert:[{invert:["",ke,ae,oe]}],saturate:[{saturate:[ke,ae,oe]}],sepia:[{sepia:["",ke,ae,oe]}],"backdrop-filter":[{"backdrop-filter":["","none",ae,oe]}],"backdrop-blur":[{"backdrop-blur":ot()}],"backdrop-brightness":[{"backdrop-brightness":[ke,ae,oe]}],"backdrop-contrast":[{"backdrop-contrast":[ke,ae,oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,ae,oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,ae,oe]}],"backdrop-invert":[{"backdrop-invert":["",ke,ae,oe]}],"backdrop-opacity":[{"backdrop-opacity":[ke,ae,oe]}],"backdrop-saturate":[{"backdrop-saturate":[ke,ae,oe]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,ae,oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":V()}],"border-spacing-x":[{"border-spacing-x":V()}],"border-spacing-y":[{"border-spacing-y":V()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ae,oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",ae,oe]}],ease:[{ease:["linear","initial",S,ae,oe]}],delay:[{delay:[ke,ae,oe]}],animate:[{animate:["none",R,ae,oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,ae,oe]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:Yt()}],"rotate-x":[{"rotate-x":Yt()}],"rotate-y":[{"rotate-y":Yt()}],"rotate-z":[{"rotate-z":Yt()}],scale:[{scale:ht()}],"scale-x":[{"scale-x":ht()}],"scale-y":[{"scale-y":ht()}],"scale-z":[{"scale-z":ht()}],"scale-3d":["scale-3d"],skew:[{skew:dn()}],"skew-x":[{"skew-x":dn()}],"skew-y":[{"skew-y":dn()}],transform:[{transform:[ae,oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Xt()}],"translate-x":[{"translate-x":Xt()}],"translate-y":[{"translate-y":Xt()}],"translate-z":[{"translate-z":Xt()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae,oe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mbs":[{"scroll-mbs":V()}],"scroll-mbe":[{"scroll-mbe":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pbs":[{"scroll-pbs":V()}],"scroll-pbe":[{"scroll-pbe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae,oe]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[ke,Eo,os,Ey]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},$_=b_(z_);function Wr(...e){return $_(Hx(e))}const H_=xT,uw=T.forwardRef(({className:e,...t},n)=>v.jsx(Ix,{ref:n,className:Wr("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));uw.displayName=Ix.displayName;const W_=wT("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),dw=T.forwardRef(({className:e,variant:t,...n},s)=>v.jsx(Fx,{ref:s,className:Wr(W_({variant:t}),e),...n}));dw.displayName=Fx.displayName;const q_=T.forwardRef(({className:e,...t},n)=>v.jsx(Ux,{ref:n,className:Wr("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));q_.displayName=Ux.displayName;const fw=T.forwardRef(({className:e,...t},n)=>v.jsx(zx,{ref:n,className:Wr("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:v.jsx(Gx,{className:"h-4 w-4"})}));fw.displayName=zx.displayName;const hw=T.forwardRef(({className:e,...t},n)=>v.jsx(Vx,{ref:n,className:Wr("text-sm font-semibold",e),...t}));hw.displayName=Vx.displayName;const pw=T.forwardRef(({className:e,...t},n)=>v.jsx(Bx,{ref:n,className:Wr("text-sm opacity-90",e),...t}));pw.displayName=Bx.displayName;function Q_(){const{toasts:e}=bC();return v.jsxs(H_,{children:[e.map(function({id:t,title:n,description:s,action:o,...l}){return v.jsxs(dw,{...l,children:[v.jsxs("div",{className:"grid gap-1",children:[n&&v.jsx(hw,{children:n}),s&&v.jsx(pw,{children:s})]}),o,v.jsx(fw,{})]},t)}),v.jsx(uw,{})]})}var ia=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},K_={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Or,Jf,rx,G_=(rx=class{constructor(){me(this,Or,K_);me(this,Jf,!1)}setTimeoutProvider(e){te(this,Or,e)}setTimeout(e,t){return O(this,Or).setTimeout(e,t)}clearTimeout(e){O(this,Or).clearTimeout(e)}setInterval(e,t){return O(this,Or).setInterval(e,t)}clearInterval(e){O(this,Or).clearInterval(e)}},Or=new WeakMap,Jf=new WeakMap,rx),fs=new G_;function Y_(e){setTimeout(e,0)}var Rs=typeof window>"u"||"Deno"in globalThis;function Bt(){}function X_(e,t){return typeof e=="function"?e(t):e}function lf(e){return typeof e=="number"&&e>=0&&e!==1/0}function mw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ur(e,t){return typeof e=="function"?e(t):e}function cn(e,t){return typeof e=="function"?e(t):e}function _y(e,t){const{type:n="all",exact:s,fetchStatus:o,predicate:l,queryKey:c,stale:d}=e;if(c){if(s){if(t.queryHash!==dh(c,t.options))return!1}else if(!Qo(t.queryKey,c))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||o&&o!==t.state.fetchStatus||l&&!l(t))}function ky(e,t){const{exact:n,status:s,predicate:o,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(qo(t.options.mutationKey)!==qo(l))return!1}else if(!Qo(t.options.mutationKey,l))return!1}return!(s&&t.state.status!==s||o&&!o(t))}function dh(e,t){return((t==null?void 0:t.queryKeyHashFn)||qo)(e)}function qo(e){return JSON.stringify(e,(t,n)=>uf(n)?Object.keys(n).sort().reduce((s,o)=>(s[o]=n[o],s),{}):n)}function Qo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Qo(e[n],t[n])):!1}var Z_=Object.prototype.hasOwnProperty;function gw(e,t,n=0){if(e===t)return e;if(n>500)return t;const s=Py(e)&&Py(t);if(!s&&!(uf(e)&&uf(t)))return t;const l=(s?e:Object.keys(e)).length,c=s?t:Object.keys(t),d=c.length,f=s?new Array(d):{};let p=0;for(let g=0;g{fs.setTimeout(t,e)})}function df(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?gw(e,t):t}function ek(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function tk(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var fh=Symbol();function yw(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===fh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function vw(e,t){return typeof e=="function"?e(...t):!!e}function nk(e,t,n){let s=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),s||(s=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var ms,jr,hi,sx,rk=(sx=class extends ia{constructor(){super();me(this,ms);me(this,jr);me(this,hi);te(this,hi,t=>{if(!Rs&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){O(this,jr)||this.setEventListener(O(this,hi))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,jr))==null||t.call(this),te(this,jr,void 0))}setEventListener(t){var n;te(this,hi,t),(n=O(this,jr))==null||n.call(this),te(this,jr,t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(t){O(this,ms)!==t&&(te(this,ms,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof O(this,ms)=="boolean"?O(this,ms):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ms=new WeakMap,jr=new WeakMap,hi=new WeakMap,sx),hh=new rk;function ff(){let e,t;const n=new Promise((o,l)=>{e=o,t=l});n.status="pending",n.catch(()=>{});function s(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{s({status:"fulfilled",value:o}),e(o)},n.reject=o=>{s({status:"rejected",reason:o}),t(o)},n}var sk=Y_;function ik(){let e=[],t=0,n=d=>{d()},s=d=>{d()},o=sk;const l=d=>{t?e.push(d):o(()=>{n(d)})},c=()=>{const d=e;e=[],d.length&&o(()=>{s(()=>{d.forEach(f=>{n(f)})})})};return{batch:d=>{let f;t++;try{f=d()}finally{t--,t||c()}return f},batchCalls:d=>(...f)=>{l(()=>{d(...f)})},schedule:l,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{s=d},setScheduler:d=>{o=d}}}var vt=ik(),pi,Lr,mi,ix,ok=(ix=class extends ia{constructor(){super();me(this,pi,!0);me(this,Lr);me(this,mi);te(this,mi,t=>{if(!Rs&&window.addEventListener){const n=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}})}onSubscribe(){O(this,Lr)||this.setEventListener(O(this,mi))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,Lr))==null||t.call(this),te(this,Lr,void 0))}setEventListener(t){var n;te(this,mi,t),(n=O(this,Lr))==null||n.call(this),te(this,Lr,t(this.setOnline.bind(this)))}setOnline(t){O(this,pi)!==t&&(te(this,pi,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return O(this,pi)}},pi=new WeakMap,Lr=new WeakMap,mi=new WeakMap,ix),ec=new ok;function ak(e){return Math.min(1e3*2**e,3e4)}function xw(e){return(e??"online")==="online"?ec.isOnline():!0}var hf=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ww(e){let t=!1,n=0,s;const o=ff(),l=()=>o.status!=="pending",c=C=>{var b;if(!l()){const S=new hf(C);x(S),(b=e.onCancel)==null||b.call(e,S)}},d=()=>{t=!0},f=()=>{t=!1},p=()=>hh.isFocused()&&(e.networkMode==="always"||ec.isOnline())&&e.canRun(),g=()=>xw(e.networkMode)&&e.canRun(),y=C=>{l()||(s==null||s(),o.resolve(C))},x=C=>{l()||(s==null||s(),o.reject(C))},E=()=>new Promise(C=>{var b;s=S=>{(l()||p())&&C(S)},(b=e.onPause)==null||b.call(e)}).then(()=>{var C;s=void 0,l()||(C=e.onContinue)==null||C.call(e)}),P=()=>{if(l())return;let C;const b=n===0?e.initialPromise:void 0;try{C=b??e.fn()}catch(S){C=Promise.reject(S)}Promise.resolve(C).then(y).catch(S=>{var U;if(l())return;const R=e.retry??(Rs?0:3),k=e.retryDelay??ak,A=typeof k=="function"?k(n,S):k,M=R===!0||typeof R=="number"&&np()?void 0:E()).then(()=>{t?x(S):P()})})};return{promise:o,status:()=>o.status,cancel:c,continue:()=>(s==null||s(),o),cancelRetry:d,continueRetry:f,canStart:g,start:()=>(g()?P():E().then(P),o)}}var gs,ox,bw=(ox=class{constructor(){me(this,gs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),lf(this.gcTime)&&te(this,gs,fs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Rs?1/0:300*1e3))}clearGcTimeout(){O(this,gs)&&(fs.clearTimeout(O(this,gs)),te(this,gs,void 0))}},gs=new WeakMap,ox),ys,gi,ln,vs,ut,Jo,xs,Sn,Zn,ax,lk=(ax=class extends bw{constructor(t){super();me(this,Sn);me(this,ys);me(this,gi);me(this,ln);me(this,vs);me(this,ut);me(this,Jo);me(this,xs);te(this,xs,!1),te(this,Jo,t.defaultOptions),this.setOptions(t.options),this.observers=[],te(this,vs,t.client),te(this,ln,O(this,vs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,te(this,ys,Ny(this.options)),this.state=t.state??O(this,ys),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=O(this,ut))==null?void 0:t.promise}setOptions(t){if(this.options={...O(this,Jo),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Ny(this.options);n.data!==void 0&&(this.setState(Ay(n.data,n.dataUpdatedAt)),te(this,ys,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,ln).remove(this)}setData(t,n){const s=df(this.state.data,t,this.options);return Ae(this,Sn,Zn).call(this,{data:s,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),s}setState(t,n){Ae(this,Sn,Zn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var s,o;const n=(s=O(this,ut))==null?void 0:s.promise;return(o=O(this,ut))==null||o.cancel(t),n?n.then(Bt).catch(Bt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(O(this,ys))}isActive(){return this.observers.some(t=>cn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===fh||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ur(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!mw(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(s=>s.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=O(this,ut))==null||n.continue()}onOnline(){var n;const t=this.observers.find(s=>s.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=O(this,ut))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),O(this,ln).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(O(this,ut)&&(O(this,xs)?O(this,ut).cancel({revert:!0}):O(this,ut).cancelRetry()),this.scheduleGc()),O(this,ln).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ae(this,Sn,Zn).call(this,{type:"invalidate"})}async fetch(t,n){var f,p,g,y,x,E,P,C,b,S,R,k;if(this.state.fetchStatus!=="idle"&&((f=O(this,ut))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(O(this,ut))return O(this,ut).continueRetry(),O(this,ut).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(M=>M.options.queryFn);A&&this.setOptions(A.options)}const s=new AbortController,o=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(te(this,xs,!0),s.signal)})},l=()=>{const A=yw(this.options,n),U=(()=>{const W={client:O(this,vs),queryKey:this.queryKey,meta:this.meta};return o(W),W})();return te(this,xs,!1),this.options.persister?this.options.persister(A,U,this):A(U)},d=(()=>{const A={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:O(this,vs),state:this.state,fetchFn:l};return o(A),A})();(p=this.options.behavior)==null||p.onFetch(d,this),te(this,gi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=d.fetchOptions)==null?void 0:g.meta))&&Ae(this,Sn,Zn).call(this,{type:"fetch",meta:(y=d.fetchOptions)==null?void 0:y.meta}),te(this,ut,ww({initialPromise:n==null?void 0:n.initialPromise,fn:d.fetchFn,onCancel:A=>{A instanceof hf&&A.revert&&this.setState({...O(this,gi),fetchStatus:"idle"}),s.abort()},onFail:(A,M)=>{Ae(this,Sn,Zn).call(this,{type:"failed",failureCount:A,error:M})},onPause:()=>{Ae(this,Sn,Zn).call(this,{type:"pause"})},onContinue:()=>{Ae(this,Sn,Zn).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const A=await O(this,ut).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(E=(x=O(this,ln).config).onSuccess)==null||E.call(x,A,this),(C=(P=O(this,ln).config).onSettled)==null||C.call(P,A,this.state.error,this),A}catch(A){if(A instanceof hf){if(A.silent)return O(this,ut).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Ae(this,Sn,Zn).call(this,{type:"error",error:A}),(S=(b=O(this,ln).config).onError)==null||S.call(b,A,this),(k=(R=O(this,ln).config).onSettled)==null||k.call(R,this.state.data,A,this),A}finally{this.scheduleGc()}}},ys=new WeakMap,gi=new WeakMap,ln=new WeakMap,vs=new WeakMap,ut=new WeakMap,Jo=new WeakMap,xs=new WeakMap,Sn=new WeakSet,Zn=function(t){const n=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Sw(s.data,this.options),fetchMeta:t.meta??null};case"success":const o={...s,...Ay(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return te(this,gi,t.manual?o:void 0),o;case"error":const l=t.error;return{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=n(this.state),vt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),O(this,ln).notify({query:this,type:"updated",action:t})})},ax);function Sw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:xw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ay(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ny(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,s=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Vt,Ne,ea,Nt,ws,yi,er,Dr,ta,vi,xi,bs,Ss,Mr,wi,Ie,Ro,pf,mf,gf,yf,vf,xf,wf,Ew,lx,ck=(lx=class extends ia{constructor(t,n){super();me(this,Ie);me(this,Vt);me(this,Ne);me(this,ea);me(this,Nt);me(this,ws);me(this,yi);me(this,er);me(this,Dr);me(this,ta);me(this,vi);me(this,xi);me(this,bs);me(this,Ss);me(this,Mr);me(this,wi,new Set);this.options=n,te(this,Vt,t),te(this,Dr,null),te(this,er,ff()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(O(this,Ne).addObserver(this),Oy(O(this,Ne),this.options)?Ae(this,Ie,Ro).call(this):this.updateResult(),Ae(this,Ie,yf).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return bf(O(this,Ne),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return bf(O(this,Ne),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ae(this,Ie,vf).call(this),Ae(this,Ie,xf).call(this),O(this,Ne).removeObserver(this)}setOptions(t){const n=this.options,s=O(this,Ne);if(this.options=O(this,Vt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof cn(this.options.enabled,O(this,Ne))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ae(this,Ie,wf).call(this),O(this,Ne).setOptions(this.options),n._defaulted&&!cf(this.options,n)&&O(this,Vt).getQueryCache().notify({type:"observerOptionsUpdated",query:O(this,Ne),observer:this});const o=this.hasListeners();o&&jy(O(this,Ne),s,this.options,n)&&Ae(this,Ie,Ro).call(this),this.updateResult(),o&&(O(this,Ne)!==s||cn(this.options.enabled,O(this,Ne))!==cn(n.enabled,O(this,Ne))||Ur(this.options.staleTime,O(this,Ne))!==Ur(n.staleTime,O(this,Ne)))&&Ae(this,Ie,pf).call(this);const l=Ae(this,Ie,mf).call(this);o&&(O(this,Ne)!==s||cn(this.options.enabled,O(this,Ne))!==cn(n.enabled,O(this,Ne))||l!==O(this,Mr))&&Ae(this,Ie,gf).call(this,l)}getOptimisticResult(t){const n=O(this,Vt).getQueryCache().build(O(this,Vt),t),s=this.createResult(n,t);return dk(this,s)&&(te(this,Nt,s),te(this,yi,this.options),te(this,ws,O(this,Ne).state)),s}getCurrentResult(){return O(this,Nt)}trackResult(t,n){return new Proxy(t,{get:(s,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&O(this,er).status==="pending"&&O(this,er).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,o))})}trackProp(t){O(this,wi).add(t)}getCurrentQuery(){return O(this,Ne)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=O(this,Vt).defaultQueryOptions(t),s=O(this,Vt).getQueryCache().build(O(this,Vt),n);return s.fetch().then(()=>this.createResult(s,n))}fetch(t){return Ae(this,Ie,Ro).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),O(this,Nt)))}createResult(t,n){var Y;const s=O(this,Ne),o=this.options,l=O(this,Nt),c=O(this,ws),d=O(this,yi),p=t!==s?t.state:O(this,ea),{state:g}=t;let y={...g},x=!1,E;if(n._optimisticResults){const ne=this.hasListeners(),ve=!ne&&Oy(t,n),_e=ne&&jy(t,s,n,o);(ve||_e)&&(y={...y,...Sw(g.data,t.options)}),n._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:P,errorUpdatedAt:C,status:b}=y;E=y.data;let S=!1;if(n.placeholderData!==void 0&&E===void 0&&b==="pending"){let ne;l!=null&&l.isPlaceholderData&&n.placeholderData===(d==null?void 0:d.placeholderData)?(ne=l.data,S=!0):ne=typeof n.placeholderData=="function"?n.placeholderData((Y=O(this,xi))==null?void 0:Y.state.data,O(this,xi)):n.placeholderData,ne!==void 0&&(b="success",E=df(l==null?void 0:l.data,ne,n),x=!0)}if(n.select&&E!==void 0&&!S)if(l&&E===(c==null?void 0:c.data)&&n.select===O(this,ta))E=O(this,vi);else try{te(this,ta,n.select),E=n.select(E),E=df(l==null?void 0:l.data,E,n),te(this,vi,E),te(this,Dr,null)}catch(ne){te(this,Dr,ne)}O(this,Dr)&&(P=O(this,Dr),E=O(this,vi),C=Date.now(),b="error");const R=y.fetchStatus==="fetching",k=b==="pending",A=b==="error",M=k&&R,U=E!==void 0,V={status:b,fetchStatus:y.fetchStatus,isPending:k,isSuccess:b==="success",isError:A,isInitialLoading:M,isLoading:M,data:E,dataUpdatedAt:y.dataUpdatedAt,error:P,errorUpdatedAt:C,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>p.dataUpdateCount||y.errorUpdateCount>p.errorUpdateCount,isFetching:R,isRefetching:R&&!k,isLoadingError:A&&!U,isPaused:y.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:A&&U,isStale:ph(t,n),refetch:this.refetch,promise:O(this,er),isEnabled:cn(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const ne=V.data!==void 0,ve=V.status==="error"&&!ne,_e=Te=>{ve?Te.reject(V.error):ne&&Te.resolve(V.data)},be=()=>{const Te=te(this,er,V.promise=ff());_e(Te)},J=O(this,er);switch(J.status){case"pending":t.queryHash===s.queryHash&&_e(J);break;case"fulfilled":(ve||V.data!==J.value)&&be();break;case"rejected":(!ve||V.error!==J.reason)&&be();break}}return V}updateResult(){const t=O(this,Nt),n=this.createResult(O(this,Ne),this.options);if(te(this,ws,O(this,Ne).state),te(this,yi,this.options),O(this,ws).data!==void 0&&te(this,xi,O(this,Ne)),cf(n,t))return;te(this,Nt,n);const s=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!O(this,wi).size)return!0;const c=new Set(l??O(this,wi));return this.options.throwOnError&&c.add("error"),Object.keys(O(this,Nt)).some(d=>{const f=d;return O(this,Nt)[f]!==t[f]&&c.has(f)})};Ae(this,Ie,Ew).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ae(this,Ie,yf).call(this)}},Vt=new WeakMap,Ne=new WeakMap,ea=new WeakMap,Nt=new WeakMap,ws=new WeakMap,yi=new WeakMap,er=new WeakMap,Dr=new WeakMap,ta=new WeakMap,vi=new WeakMap,xi=new WeakMap,bs=new WeakMap,Ss=new WeakMap,Mr=new WeakMap,wi=new WeakMap,Ie=new WeakSet,Ro=function(t){Ae(this,Ie,wf).call(this);let n=O(this,Ne).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Bt)),n},pf=function(){Ae(this,Ie,vf).call(this);const t=Ur(this.options.staleTime,O(this,Ne));if(Rs||O(this,Nt).isStale||!lf(t))return;const s=mw(O(this,Nt).dataUpdatedAt,t)+1;te(this,bs,fs.setTimeout(()=>{O(this,Nt).isStale||this.updateResult()},s))},mf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(O(this,Ne)):this.options.refetchInterval)??!1},gf=function(t){Ae(this,Ie,xf).call(this),te(this,Mr,t),!(Rs||cn(this.options.enabled,O(this,Ne))===!1||!lf(O(this,Mr))||O(this,Mr)===0)&&te(this,Ss,fs.setInterval(()=>{(this.options.refetchIntervalInBackground||hh.isFocused())&&Ae(this,Ie,Ro).call(this)},O(this,Mr)))},yf=function(){Ae(this,Ie,pf).call(this),Ae(this,Ie,gf).call(this,Ae(this,Ie,mf).call(this))},vf=function(){O(this,bs)&&(fs.clearTimeout(O(this,bs)),te(this,bs,void 0))},xf=function(){O(this,Ss)&&(fs.clearInterval(O(this,Ss)),te(this,Ss,void 0))},wf=function(){const t=O(this,Vt).getQueryCache().build(O(this,Vt),this.options);if(t===O(this,Ne))return;const n=O(this,Ne);te(this,Ne,t),te(this,ea,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Ew=function(t){vt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(O(this,Nt))}),O(this,Vt).getQueryCache().notify({query:O(this,Ne),type:"observerResultsUpdated"})})},lx);function uk(e,t){return cn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Oy(e,t){return uk(e,t)||e.state.data!==void 0&&bf(e,t,t.refetchOnMount)}function bf(e,t,n){if(cn(t.enabled,e)!==!1&&Ur(t.staleTime,e)!=="static"){const s=typeof n=="function"?n(e):n;return s==="always"||s!==!1&&ph(e,t)}return!1}function jy(e,t,n,s){return(e!==t||cn(s.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ph(e,n)}function ph(e,t){return cn(t.enabled,e)!==!1&&e.isStaleByTime(Ur(t.staleTime,e))}function dk(e,t){return!cf(e.getCurrentResult(),t)}function Ly(e){return{onFetch:(t,n)=>{var g,y,x,E,P;const s=t.options,o=(x=(y=(g=t.fetchOptions)==null?void 0:g.meta)==null?void 0:y.fetchMore)==null?void 0:x.direction,l=((E=t.state.data)==null?void 0:E.pages)||[],c=((P=t.state.data)==null?void 0:P.pageParams)||[];let d={pages:[],pageParams:[]},f=0;const p=async()=>{let C=!1;const b=k=>{nk(k,()=>t.signal,()=>C=!0)},S=yw(t.options,t.fetchOptions),R=async(k,A,M)=>{if(C)return Promise.reject();if(A==null&&k.pages.length)return Promise.resolve(k);const W=(()=>{const ve={client:t.client,queryKey:t.queryKey,pageParam:A,direction:M?"backward":"forward",meta:t.options.meta};return b(ve),ve})(),V=await S(W),{maxPages:Y}=t.options,ne=M?tk:ek;return{pages:ne(k.pages,V,Y),pageParams:ne(k.pageParams,A,Y)}};if(o&&l.length){const k=o==="backward",A=k?fk:Dy,M={pages:l,pageParams:c},U=A(s,M);d=await R(M,U,k)}else{const k=e??l.length;do{const A=f===0?c[0]??s.initialPageParam:Dy(s,d);if(f>0&&A==null)break;d=await R(d,A),f++}while(f{var C,b;return(b=(C=t.options).persister)==null?void 0:b.call(C,p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=p}}}function Dy(e,{pages:t,pageParams:n}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,n[s],n):void 0}function fk(e,{pages:t,pageParams:n}){var s;return t.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,t[0],t,n[0],n):void 0}var na,On,Tt,Es,jn,Rr,cx,hk=(cx=class extends bw{constructor(t){super();me(this,jn);me(this,na);me(this,On);me(this,Tt);me(this,Es);te(this,na,t.client),this.mutationId=t.mutationId,te(this,Tt,t.mutationCache),te(this,On,[]),this.state=t.state||pk(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){O(this,On).includes(t)||(O(this,On).push(t),this.clearGcTimeout(),O(this,Tt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){te(this,On,O(this,On).filter(n=>n!==t)),this.scheduleGc(),O(this,Tt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){O(this,On).length||(this.state.status==="pending"?this.scheduleGc():O(this,Tt).remove(this))}continue(){var t;return((t=O(this,Es))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,d,f,p,g,y,x,E,P,C,b,S,R,k,A,M,U,W;const n=()=>{Ae(this,jn,Rr).call(this,{type:"continue"})},s={client:O(this,na),meta:this.options.meta,mutationKey:this.options.mutationKey};te(this,Es,ww({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(V,Y)=>{Ae(this,jn,Rr).call(this,{type:"failed",failureCount:V,error:Y})},onPause:()=>{Ae(this,jn,Rr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,Tt).canRun(this)}));const o=this.state.status==="pending",l=!O(this,Es).canStart();try{if(o)n();else{Ae(this,jn,Rr).call(this,{type:"pending",variables:t,isPaused:l}),O(this,Tt).config.onMutate&&await O(this,Tt).config.onMutate(t,this,s);const Y=await((d=(c=this.options).onMutate)==null?void 0:d.call(c,t,s));Y!==this.state.context&&Ae(this,jn,Rr).call(this,{type:"pending",context:Y,variables:t,isPaused:l})}const V=await O(this,Es).start();return await((p=(f=O(this,Tt).config).onSuccess)==null?void 0:p.call(f,V,t,this.state.context,this,s)),await((y=(g=this.options).onSuccess)==null?void 0:y.call(g,V,t,this.state.context,s)),await((E=(x=O(this,Tt).config).onSettled)==null?void 0:E.call(x,V,null,this.state.variables,this.state.context,this,s)),await((C=(P=this.options).onSettled)==null?void 0:C.call(P,V,null,t,this.state.context,s)),Ae(this,jn,Rr).call(this,{type:"success",data:V}),V}catch(V){try{await((S=(b=O(this,Tt).config).onError)==null?void 0:S.call(b,V,t,this.state.context,this,s))}catch(Y){Promise.reject(Y)}try{await((k=(R=this.options).onError)==null?void 0:k.call(R,V,t,this.state.context,s))}catch(Y){Promise.reject(Y)}try{await((M=(A=O(this,Tt).config).onSettled)==null?void 0:M.call(A,void 0,V,this.state.variables,this.state.context,this,s))}catch(Y){Promise.reject(Y)}try{await((W=(U=this.options).onSettled)==null?void 0:W.call(U,void 0,V,t,this.state.context,s))}catch(Y){Promise.reject(Y)}throw Ae(this,jn,Rr).call(this,{type:"error",error:V}),V}finally{O(this,Tt).runNext(this)}}},na=new WeakMap,On=new WeakMap,Tt=new WeakMap,Es=new WeakMap,jn=new WeakSet,Rr=function(t){const n=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),vt.batch(()=>{O(this,On).forEach(s=>{s.onMutationUpdate(t)}),O(this,Tt).notify({mutation:this,type:"updated",action:t})})},cx);function pk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var tr,En,ra,ux,mk=(ux=class extends ia{constructor(t={}){super();me(this,tr);me(this,En);me(this,ra);this.config=t,te(this,tr,new Set),te(this,En,new Map),te(this,ra,0)}build(t,n,s){const o=new hk({client:t,mutationCache:this,mutationId:++El(this,ra)._,options:t.defaultMutationOptions(n),state:s});return this.add(o),o}add(t){O(this,tr).add(t);const n=Rl(t);if(typeof n=="string"){const s=O(this,En).get(n);s?s.push(t):O(this,En).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(O(this,tr).delete(t)){const n=Rl(t);if(typeof n=="string"){const s=O(this,En).get(n);if(s)if(s.length>1){const o=s.indexOf(t);o!==-1&&s.splice(o,1)}else s[0]===t&&O(this,En).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Rl(t);if(typeof n=="string"){const s=O(this,En).get(n),o=s==null?void 0:s.find(l=>l.state.status==="pending");return!o||o===t}else return!0}runNext(t){var s;const n=Rl(t);if(typeof n=="string"){const o=(s=O(this,En).get(n))==null?void 0:s.find(l=>l!==t&&l.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){vt.batch(()=>{O(this,tr).forEach(t=>{this.notify({type:"removed",mutation:t})}),O(this,tr).clear(),O(this,En).clear()})}getAll(){return Array.from(O(this,tr))}find(t){const n={exact:!0,...t};return this.getAll().find(s=>ky(n,s))}findAll(t={}){return this.getAll().filter(n=>ky(t,n))}notify(t){vt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return vt.batch(()=>Promise.all(t.map(n=>n.continue().catch(Bt))))}},tr=new WeakMap,En=new WeakMap,ra=new WeakMap,ux);function Rl(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Ln,dx,gk=(dx=class extends ia{constructor(t={}){super();me(this,Ln);this.config=t,te(this,Ln,new Map)}build(t,n,s){const o=n.queryKey,l=n.queryHash??dh(o,n);let c=this.get(l);return c||(c=new lk({client:t,queryKey:o,queryHash:l,options:t.defaultQueryOptions(n),state:s,defaultOptions:t.getQueryDefaults(o)}),this.add(c)),c}add(t){O(this,Ln).has(t.queryHash)||(O(this,Ln).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=O(this,Ln).get(t.queryHash);n&&(t.destroy(),n===t&&O(this,Ln).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){vt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return O(this,Ln).get(t)}getAll(){return[...O(this,Ln).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(s=>_y(n,s))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(s=>_y(t,s)):n}notify(t){vt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){vt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){vt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ln=new WeakMap,dx),Ke,Ir,Fr,bi,Si,Vr,Ei,Ci,fx,yk=(fx=class{constructor(e={}){me(this,Ke);me(this,Ir);me(this,Fr);me(this,bi);me(this,Si);me(this,Vr);me(this,Ei);me(this,Ci);te(this,Ke,e.queryCache||new gk),te(this,Ir,e.mutationCache||new mk),te(this,Fr,e.defaultOptions||{}),te(this,bi,new Map),te(this,Si,new Map),te(this,Vr,0)}mount(){El(this,Vr)._++,O(this,Vr)===1&&(te(this,Ei,hh.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,Ke).onFocus())})),te(this,Ci,ec.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,Ke).onOnline())})))}unmount(){var e,t;El(this,Vr)._--,O(this,Vr)===0&&((e=O(this,Ei))==null||e.call(this),te(this,Ei,void 0),(t=O(this,Ci))==null||t.call(this),te(this,Ci,void 0))}isFetching(e){return O(this,Ke).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return O(this,Ir).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=O(this,Ke).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=O(this,Ke).build(this,t),s=n.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ur(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return O(this,Ke).findAll(e).map(({queryKey:t,state:n})=>{const s=n.data;return[t,s]})}setQueryData(e,t,n){const s=this.defaultQueryOptions({queryKey:e}),o=O(this,Ke).get(s.queryHash),l=o==null?void 0:o.state.data,c=X_(t,l);if(c!==void 0)return O(this,Ke).build(this,s).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return vt.batch(()=>O(this,Ke).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=O(this,Ke).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=O(this,Ke);vt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=O(this,Ke);return vt.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},s=vt.batch(()=>O(this,Ke).findAll(e).map(o=>o.cancel(n)));return Promise.all(s).then(Bt).catch(Bt)}invalidateQueries(e,t={}){return vt.batch(()=>(O(this,Ke).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},s=vt.batch(()=>O(this,Ke).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,n);return n.throwOnError||(l=l.catch(Bt)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(s).then(Bt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=O(this,Ke).build(this,t);return n.isStaleByTime(Ur(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Bt).catch(Bt)}fetchInfiniteQuery(e){return e.behavior=Ly(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Bt).catch(Bt)}ensureInfiniteQueryData(e){return e.behavior=Ly(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ec.isOnline()?O(this,Ir).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,Ke)}getMutationCache(){return O(this,Ir)}getDefaultOptions(){return O(this,Fr)}setDefaultOptions(e){te(this,Fr,e)}setQueryDefaults(e,t){O(this,bi).set(qo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...O(this,bi).values()],n={};return t.forEach(s=>{Qo(e,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(e,t){O(this,Si).set(qo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...O(this,Si).values()],n={};return t.forEach(s=>{Qo(e,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...O(this,Fr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=dh(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===fh&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...O(this,Fr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){O(this,Ke).clear(),O(this,Ir).clear()}},Ke=new WeakMap,Ir=new WeakMap,Fr=new WeakMap,bi=new WeakMap,Si=new WeakMap,Vr=new WeakMap,Ei=new WeakMap,Ci=new WeakMap,fx),Cw=T.createContext(void 0),vk=e=>{const t=T.useContext(Cw);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},xk=({client:e,children:t})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),v.jsx(Cw.Provider,{value:e,children:t})),Tw=T.createContext(!1),wk=()=>T.useContext(Tw);Tw.Provider;function bk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Sk=T.createContext(bk()),Ek=()=>T.useContext(Sk),Ck=(e,t,n)=>{const s=n!=null&&n.state.error&&typeof e.throwOnError=="function"?vw(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&(t.isReset()||(e.retryOnMount=!1))},Tk=e=>{T.useEffect(()=>{e.clearReset()},[e])},_k=({result:e,errorResetBoundary:t,throwOnError:n,query:s,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(o&&e.data===void 0||vw(n,[e.error,s])),kk=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...o)=>n(s(...o)):n(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Pk=(e,t)=>e.isLoading&&e.isFetching&&!t,Rk=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,My=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Ak(e,t,n){var x,E,P,C;const s=wk(),o=Ek(),l=vk(),c=l.defaultQueryOptions(e);(E=(x=l.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||E.call(x,c);const d=l.getQueryCache().get(c.queryHash);c._optimisticResults=s?"isRestoring":"optimistic",kk(c),Ck(c,o,d),Tk(o);const f=!l.getQueryCache().get(c.queryHash),[p]=T.useState(()=>new t(l,c)),g=p.getOptimisticResult(c),y=!s&&e.subscribed!==!1;if(T.useSyncExternalStore(T.useCallback(b=>{const S=y?p.subscribe(vt.batchCalls(b)):Bt;return p.updateResult(),S},[p,y]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),T.useEffect(()=>{p.setOptions(c)},[c,p]),Rk(c,g))throw My(c,p,o);if(_k({result:g,errorResetBoundary:o,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw g.error;if((C=(P=l.getDefaultOptions().queries)==null?void 0:P._experimental_afterQuery)==null||C.call(P,c,g),c.experimental_prefetchInRender&&!Rs&&Pk(g,s)){const b=f?My(c,p,o):d==null?void 0:d.promise;b==null||b.catch(Bt).finally(()=>{p.updateResult()})}return c.notifyOnChangeProps?g:p.trackResult(g)}function Nk(e,t){return Ak(e,ck)}const Ok=new yk({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function tc(){return tc=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function _w(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Lk(){return Math.random().toString(36).substr(2,8)}function Fy(e,t){return{usr:e.state,key:e.key,idx:t}}function Sf(e,t,n,s){return n===void 0&&(n=null),tc({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?pc(t):t,{state:n,key:t&&t.key||s||Lk()})}function kw(e){let{pathname:t="/",search:n="",hash:s=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),s&&s!=="#"&&(t+=s.charAt(0)==="#"?s:"#"+s),t}function pc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let s=e.indexOf("?");s>=0&&(t.search=e.substr(s),e=e.substr(0,s)),e&&(t.pathname=e)}return t}function Dk(e,t,n,s){s===void 0&&(s={});let{window:o=document.defaultView,v5Compat:l=!1}=s,c=o.history,d=Br.Pop,f=null,p=g();p==null&&(p=0,c.replaceState(tc({},c.state,{idx:p}),""));function g(){return(c.state||{idx:null}).idx}function y(){d=Br.Pop;let b=g(),S=b==null?null:b-p;p=b,f&&f({action:d,location:C.location,delta:S})}function x(b,S){d=Br.Push;let R=Sf(C.location,b,S);p=g()+1;let k=Fy(R,p),A=C.createHref(R);try{c.pushState(k,"",A)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;o.location.assign(A)}l&&f&&f({action:d,location:C.location,delta:1})}function E(b,S){d=Br.Replace;let R=Sf(C.location,b,S);p=g();let k=Fy(R,p),A=C.createHref(R);c.replaceState(k,"",A),l&&f&&f({action:d,location:C.location,delta:0})}function P(b){let S=o.location.origin!=="null"?o.location.origin:o.location.href,R=typeof b=="string"?b:kw(b);return R=R.replace(/ $/,"%20"),$t(S,"No window.location.(origin|href) available to create URL for href: "+R),new URL(R,S)}let C={get action(){return d},get location(){return e(o,c)},listen(b){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(Iy,y),f=b,()=>{o.removeEventListener(Iy,y),f=null}},createHref(b){return t(o,b)},createURL:P,encodeLocation(b){let S=P(b);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:x,replace:E,go(b){return c.go(b)}};return C}var Vy;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Vy||(Vy={}));function Mk(e,t,n){return n===void 0&&(n="/"),Ik(e,t,n)}function Ik(e,t,n,s){let o=typeof t=="string"?pc(t):t,l=Aw(o.pathname||"/",n);if(l==null)return null;let c=Pw(e);Fk(c);let d=null,f=Yk(l);for(let p=0;d==null&&p{let f={relativePath:d===void 0?l.path||"":d,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};f.relativePath.startsWith("/")&&($t(f.relativePath.startsWith(s),'Absolute route path "'+f.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),f.relativePath=f.relativePath.slice(s.length));let p=fi([s,f.relativePath]),g=n.concat(f);l.children&&l.children.length>0&&($t(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),Pw(l.children,t,g,p)),!(l.path==null&&!l.index)&&t.push({path:p,score:Wk(p,l.index),routesMeta:g})};return e.forEach((l,c)=>{var d;if(l.path===""||!((d=l.path)!=null&&d.includes("?")))o(l,c);else for(let f of Rw(l.path))o(l,c,f)}),t}function Rw(e){let t=e.split("/");if(t.length===0)return[];let[n,...s]=t,o=n.endsWith("?"),l=n.replace(/\?$/,"");if(s.length===0)return o?[l,""]:[l];let c=Rw(s.join("/")),d=[];return d.push(...c.map(f=>f===""?l:[l,f].join("/"))),o&&d.push(...c),d.map(f=>e.startsWith("/")&&f===""?"/":f)}function Fk(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:qk(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}const Vk=/^:[\w-]+$/,Bk=3,Uk=2,zk=1,$k=10,Hk=-2,By=e=>e==="*";function Wk(e,t){let n=e.split("/"),s=n.length;return n.some(By)&&(s+=Hk),t&&(s+=Uk),n.filter(o=>!By(o)).reduce((o,l)=>o+(Vk.test(l)?Bk:l===""?zk:$k),s)}function qk(e,t){return e.length===t.length&&e.slice(0,-1).every((s,o)=>s===t[o])?e[e.length-1]-t[t.length-1]:0}function Qk(e,t,n){let{routesMeta:s}=e,o={},l="/",c=[];for(let d=0;d{let{paramName:x,isOptional:E}=g;if(x==="*"){let C=d[y]||"";c=l.slice(0,l.length-C.length).replace(/(.)\/+$/,"$1")}const P=d[y];return E&&!P?p[x]=void 0:p[x]=(P||"").replace(/%2F/g,"/"),p},{}),pathname:l,pathnameBase:c,pattern:e}}function Gk(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),_w(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let s=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,f)=>(s.push({paramName:d,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(s.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),s]}function Yk(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return _w(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Aw(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,s=e.charAt(n);return s&&s!=="/"?null:e.slice(n)||"/"}const Xk=e=>e.replace(/\/\/+/g,"/"),fi=e=>Xk(e.join("/")),Zk=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function Jk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Nw=["post","put","patch","delete"];new Set(Nw);const eP=["get",...Nw];new Set(eP);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function nc(){return nc=Object.assign?Object.assign.bind():function(e){for(var t=1;tObject.assign({},b,{params:Object.assign({},d,b.params),pathname:fi([f,o.encodeLocation?o.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?f:fi([f,o.encodeLocation?o.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),l,n,s);return t&&C?T.createElement(oa.Provider,{value:{location:nc({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:Br.Pop}},C):C}function oP(){let e=pP(),t=Jk(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},t),n?T.createElement("pre",{style:o},n):null,null)}const aP=T.createElement(oP,null);class lP extends T.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?T.createElement(mc.Provider,{value:this.props.routeContext},T.createElement(jw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function cP(e){let{routeContext:t,match:n,children:s}=e,o=T.useContext(tP);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),T.createElement(mc.Provider,{value:t},s)}function uP(e,t,n,s){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),s===void 0&&(s=null),e==null){var l;if(!n)return null;if(n.errors)e=n.matches;else if((l=s)!=null&&l.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let c=e,d=(o=n)==null?void 0:o.errors;if(d!=null){let g=c.findIndex(y=>y.route.id&&(d==null?void 0:d[y.route.id])!==void 0);g>=0||$t(!1),c=c.slice(0,Math.min(c.length,g+1))}let f=!1,p=-1;if(n&&s&&s.v7_partialHydration)for(let g=0;g=0?c=c.slice(0,p+1):c=[c[0]];break}}}return c.reduceRight((g,y,x)=>{let E,P=!1,C=null,b=null;n&&(E=d&&y.route.id?d[y.route.id]:void 0,C=y.route.errorElement||aP,f&&(p<0&&x===0?(mP("route-fallback"),P=!0,b=null):p===x&&(P=!0,b=y.route.hydrateFallbackElement||null)));let S=t.concat(c.slice(0,x+1)),R=()=>{let k;return E?k=C:P?k=b:y.route.Component?k=T.createElement(y.route.Component,null):y.route.element?k=y.route.element:k=g,T.createElement(cP,{match:y,routeContext:{outlet:g,matches:S,isDataRoute:n!=null},children:k})};return n&&(y.route.ErrorBoundary||y.route.errorElement||x===0)?T.createElement(lP,{location:n.location,revalidation:n.revalidation,component:C,error:E,children:R(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):R()},null)}var Lw=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(Lw||{});function dP(e){let t=T.useContext(nP);return t||$t(!1),t}function fP(e){let t=T.useContext(mc);return t||$t(!1),t}function hP(e){let t=fP(),n=t.matches[t.matches.length-1];return n.route.id||$t(!1),n.route.id}function pP(){var e;let t=T.useContext(jw),n=dP(Lw.UseRouteError),s=hP();return t!==void 0?t:(e=n.errors)==null?void 0:e[s]}const Uy={};function mP(e,t,n){Uy[e]||(Uy[e]=!0)}function gP(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Ef(e){$t(!1)}function yP(e){let{basename:t="/",children:n=null,location:s,navigationType:o=Br.Pop,navigator:l,static:c=!1,future:d}=e;mh()&&$t(!1);let f=t.replace(/^\/*/,"/"),p=T.useMemo(()=>({basename:f,navigator:l,static:c,future:nc({v7_relativeSplatPath:!1},d)}),[f,d,l,c]);typeof s=="string"&&(s=pc(s));let{pathname:g="/",search:y="",hash:x="",state:E=null,key:P="default"}=s,C=T.useMemo(()=>{let b=Aw(g,f);return b==null?null:{location:{pathname:b,search:y,hash:x,state:E,key:P},navigationType:o}},[f,g,y,x,E,P,o]);return C==null?null:T.createElement(Ow.Provider,{value:p},T.createElement(oa.Provider,{children:n,value:C}))}function vP(e){let{children:t,location:n}=e;return sP(Cf(t),n)}new Promise(()=>{});function Cf(e,t){t===void 0&&(t=[]);let n=[];return T.Children.forEach(e,(s,o)=>{if(!T.isValidElement(s))return;let l=[...t,o];if(s.type===T.Fragment){n.push.apply(n,Cf(s.props.children,l));return}s.type!==Ef&&$t(!1),!s.props.index||!s.props.children||$t(!1);let c={id:s.props.id||l.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(c.children=Cf(s.props.children,l)),n.push(c)}),n}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const xP="6";try{window.__reactRouterVersion=xP}catch{}const wP="startTransition",zy=px[wP];function bP(e){let{basename:t,children:n,future:s,window:o}=e,l=T.useRef();l.current==null&&(l.current=jk({window:o,v5Compat:!0}));let c=l.current,[d,f]=T.useState({action:c.action,location:c.location}),{v7_startTransition:p}=s||{},g=T.useCallback(y=>{p&&zy?zy(()=>f(y)):f(y)},[f,p]);return T.useLayoutEffect(()=>c.listen(g),[c,g]),T.useEffect(()=>gP(s),[s]),T.createElement(yP,{basename:t,children:n,location:d.location,navigationType:d.action,navigator:c,future:s})}var $y;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})($y||($y={}));var Hy;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Hy||(Hy={}));function Dw(e,t){return function(){return e.apply(t,arguments)}}const{toString:SP}=Object.prototype,{getPrototypeOf:Ti}=Object,{iterator:aa,toStringTag:Mw}=Symbol,rc=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ko=(e,t)=>{let n=e;const s=[];for(;n!=null&&n!==Object.prototype;){if(s.indexOf(n)!==-1)return!1;if(s.push(n),rc(n,t))return!0;n=Ti(n)}return!1},EP=(e,t)=>e!=null&&Ko(e,t)?e[t]:void 0,yh=(e=>t=>{const n=SP.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),_n=e=>(e=e.toLowerCase(),t=>yh(t)===e),gc=e=>t=>typeof t===e,{isArray:As}=Array,_i=gc("undefined");function Ri(e){return e!==null&&!_i(e)&&e.constructor!==null&&!_i(e.constructor)&&Ut(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Iw=_n("ArrayBuffer");function CP(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Iw(e.buffer),t}const TP=gc("string"),Ut=gc("function"),Fw=gc("number"),Ai=e=>e!==null&&typeof e=="object",_P=e=>e===!0||e===!1,Ul=e=>{if(!Ai(e))return!1;const t=Ti(e);return(t===null||t===Object.prototype||Ti(t)===null)&&!Ko(e,Mw)&&!Ko(e,aa)},kP=e=>{if(!Ai(e)||Ri(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},PP=_n("Date"),RP=_n("File"),AP=e=>!!(e&&typeof e.uri<"u"),NP=e=>e&&typeof e.getParts<"u",OP=_n("Blob"),jP=_n("FileList"),LP=e=>Ai(e)&&Ut(e.pipe);function DP(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Wy=DP(),qy=typeof Wy.FormData<"u"?Wy.FormData:void 0,MP=e=>{if(!e)return!1;if(qy&&e instanceof qy)return!0;const t=Ti(e);if(!t||t===Object.prototype||!Ut(e.append))return!1;const n=yh(e);return n==="formdata"||n==="object"&&Ut(e.toString)&&e.toString()==="[object FormData]"},IP=_n("URLSearchParams"),[FP,VP,BP,UP]=["ReadableStream","Request","Response","Headers"].map(_n),zP=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function la(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,o;if(typeof e!="object"&&(e=[e]),As(e))for(s=0,o=e.length;s0;)if(o=n[s],t===o.toLowerCase())return o;return null}const hs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Bw=e=>!_i(e)&&e!==hs;function Tf(...e){const{caseless:t,skipUndefined:n}=Bw(this)&&this||{},s={},o=(l,c)=>{if(c==="__proto__"||c==="constructor"||c==="prototype")return;const d=t&&typeof c=="string"&&Vw(s,c)||c,f=rc(s,d)?s[d]:void 0;Ul(f)&&Ul(l)?s[d]=Tf(f,l):Ul(l)?s[d]=Tf({},l):As(l)?s[d]=l.slice():(!n||!_i(l))&&(s[d]=l)};for(let l=0,c=e.length;l(la(t,(o,l)=>{n&&Ut(o)?Object.defineProperty(e,l,{__proto__:null,value:Dw(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,l,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:s}),e),HP=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),WP=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},qP=(e,t,n,s)=>{let o,l,c;const d={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),l=o.length;l-- >0;)c=o[l],(!s||s(c,e,t))&&!d[c]&&(t[c]=e[c],d[c]=!0);e=n!==!1&&Ti(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},QP=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},KP=e=>{if(!e)return null;if(As(e))return e;let t=e.length;if(!Fw(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},GP=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ti(Uint8Array)),YP=(e,t)=>{const s=(e&&e[aa]).call(e);let o;for(;(o=s.next())&&!o.done;){const l=o.value;t.call(e,l[0],l[1])}},XP=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},ZP=_n("HTMLFormElement"),JP=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,o){return s.toUpperCase()+o}),{propertyIsEnumerable:eR}=Object.prototype,tR=_n("RegExp"),Uw=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};la(n,(o,l)=>{let c;(c=t(o,l,e))!==!1&&(s[l]=c||o)}),Object.defineProperties(e,s)},nR=e=>{Uw(e,(t,n)=>{if(Ut(e)&&["arguments","caller","callee"].includes(n))return!1;const s=e[n];if(Ut(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},rR=(e,t)=>{const n={},s=o=>{o.forEach(l=>{n[l]=!0})};return As(e)?s(e):s(String(e).split(t)),n},sR=()=>{},iR=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function oR(e){return!!(e&&Ut(e.append)&&e[Mw]==="FormData"&&e[aa])}const aR=e=>{const t=new WeakSet,n=s=>{if(Ai(s)){if(t.has(s))return;if(Ri(s))return s;if(!("toJSON"in s)){t.add(s);const o=As(s)?[]:{};return la(s,(l,c)=>{const d=n(l);!_i(d)&&(o[c]=d)}),t.delete(s),o}}return s};return n(e)},lR=_n("AsyncFunction"),cR=e=>e&&(Ai(e)||Ut(e))&&Ut(e.then)&&Ut(e.catch),zw=((e,t)=>e?setImmediate:t?((n,s)=>(hs.addEventListener("message",({source:o,data:l})=>{o===hs&&l===n&&s.length&&s.shift()()},!1),o=>{s.push(o),hs.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ut(hs.postMessage)),uR=typeof queueMicrotask<"u"?queueMicrotask.bind(hs):typeof process<"u"&&process.nextTick||zw,$w=e=>e!=null&&Ut(e[aa]),dR=e=>e!=null&&Ko(e,aa)&&$w(e),D={isArray:As,isArrayBuffer:Iw,isBuffer:Ri,isFormData:MP,isArrayBufferView:CP,isString:TP,isNumber:Fw,isBoolean:_P,isObject:Ai,isPlainObject:Ul,isEmptyObject:kP,isReadableStream:FP,isRequest:VP,isResponse:BP,isHeaders:UP,isUndefined:_i,isDate:PP,isFile:RP,isReactNativeBlob:AP,isReactNative:NP,isBlob:OP,isRegExp:tR,isFunction:Ut,isStream:LP,isURLSearchParams:IP,isTypedArray:GP,isFileList:jP,forEach:la,merge:Tf,extend:$P,trim:zP,stripBOM:HP,inherits:WP,toFlatObject:qP,kindOf:yh,kindOfTest:_n,endsWith:QP,toArray:KP,forEachEntry:YP,matchAll:XP,isHTMLForm:ZP,hasOwnProperty:rc,hasOwnProp:rc,hasOwnInPrototypeChain:Ko,getSafeProp:EP,reduceDescriptors:Uw,freezeMethods:nR,toObjectSet:rR,toCamelCase:JP,noop:sR,toFiniteNumber:iR,findKey:Vw,global:hs,isContextDefined:Bw,isSpecCompliantForm:oR,toJSONObject:aR,isAsyncFn:lR,isThenable:cR,setImmediate:zw,asap:uR,isIterable:$w,isSafeIterable:dR},fR=D.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),hR=e=>{const t={};let n,s,o;return e&&e.split(` `).forEach(function(c){o=c.indexOf(":"),n=c.substring(0,o).trim().toLowerCase(),s=c.substring(o+1).trim(),!(!n||t[n]&&fR[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t};function pR(e){let t=0,n=e.length;for(;tt;){const s=e.charCodeAt(n-1);if(s!==9&&s!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const mR=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),gR=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function vh(e,t){return D.isArray(e)?e.map(n=>vh(n,t)):pR(String(e).replace(t,""))}const yR=e=>vh(e,mR),vR=e=>vh(e,gR);function Hw(e){const t=Object.create(null);return D.forEach(e.toJSON(),(n,s)=>{t[s]=vR(n)}),t}const Qy=Symbol("internals");function Co(e){return e&&String(e).trim().toLowerCase()}function zl(e){return e===!1||e==null?e:D.isArray(e)?e.map(zl):yR(String(e))}function xR(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const wR=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Rd(e,t,n,s,o){if(D.isFunction(s))return s.call(this,t,n);if(o&&(t=n),!!D.isString(t)){if(D.isString(s))return t.indexOf(s)!==-1;if(D.isRegExp(s))return s.test(t)}}function bR(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function SR(e,t){const n=D.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{__proto__:null,value:function(o,l,c){return this[s].call(this,t,o,l,c)},configurable:!0})})}let Pt=class{constructor(t){t&&this.set(t)}set(t,n,s){const o=this;function l(d,f,p){const g=Co(f);if(!g)return;const y=D.findKey(o,g);(!y||o[y]===void 0||p===!0||p===void 0&&o[y]!==!1)&&(o[y||f]=zl(d))}const c=(d,f)=>D.forEach(d,(p,g)=>l(p,g,f));if(D.isPlainObject(t)||t instanceof this.constructor)c(t,n);else if(D.isString(t)&&(t=t.trim())&&!wR(t))c(hR(t),n);else if(D.isObject(t)&&D.isSafeIterable(t)){let d=Object.create(null),f,p;for(const g of t){if(!D.isArray(g))throw new TypeError("Object iterator must return a key-value pair");p=g[0],D.hasOwnProp(d,p)?(f=d[p],d[p]=D.isArray(f)?[...f,g[1]]:[f,g[1]]):d[p]=g[1]}c(d,n)}else t!=null&&l(n,t,s);return this}get(t,n){if(t=Co(t),t){const s=D.findKey(this,t);if(s){const o=this[s];if(!n)return o;if(n===!0)return xR(o);if(D.isFunction(n))return n.call(this,o,s);if(D.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Co(t),t){const s=D.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||Rd(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let o=!1;function l(c){if(c=Co(c),c){const d=D.findKey(s,c);d&&(!n||Rd(s,s[d],d,n))&&(delete s[d],o=!0)}}return D.isArray(t)?t.forEach(l):l(t),o}clear(t){const n=Object.keys(this);let s=n.length,o=!1;for(;s--;){const l=n[s];(!t||Rd(this,this[l],l,t,!0))&&(delete this[l],o=!0)}return o}normalize(t){const n=this,s={};return D.forEach(this,(o,l)=>{const c=D.findKey(s,l);if(c){n[c]=zl(o),delete n[l];return}const d=t?bR(l):String(l).trim();d!==l&&delete n[l],n[d]=zl(o),s[d]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return D.forEach(this,(s,o)=>{s!=null&&s!==!1&&(n[o]=t&&D.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(o=>s.set(o)),s}static accessor(t){const s=(this[Qy]=this[Qy]={accessors:{}}).accessors,o=this.prototype;function l(c){const d=Co(c);s[d]||(SR(o,c),s[d]=!0)}return D.isArray(t)?t.forEach(l):l(t),this}};Pt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);D.reduceDescriptors(Pt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});D.freezeMethods(Pt);const ER="[REDACTED ****]";function CR(e){if(D.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(D.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function TR(e,t){const n=new Set(t.map(l=>String(l).toLowerCase())),s=[],o=l=>{if(l===null||typeof l!="object"||D.isBuffer(l))return l;if(s.indexOf(l)!==-1)return;l instanceof Pt&&(l=l.toJSON()),s.push(l);let c;if(D.isArray(l))c=[],l.forEach((d,f)=>{const p=o(d);D.isUndefined(p)||(c[f]=p)});else{if(!D.isPlainObject(l)&&CR(l))return s.pop(),l;c=Object.create(null);for(const[d,f]of Object.entries(l)){const p=n.has(d.toLowerCase())?ER:o(f);D.isUndefined(p)||(c[d]=p)}}return s.pop(),c};return o(e)}let Z=class Ww extends Error{static from(t,n,s,o,l,c){const d=new Ww(t.message,n||t.code,s,o,l);return Object.defineProperty(d,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),d.name=t.name,t.status!=null&&d.status==null&&(d.status=t.status),c&&Object.assign(d,c),d}constructor(t,n,s,o,l){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),s&&(this.config=s),o&&(this.request=o),l&&(this.response=l,this.status=l.status)}toJSON(){const t=this.config,n=t&&D.hasOwnProp(t,"redact")?t.redact:void 0,s=D.isArray(n)&&n.length>0?TR(t,n):D.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:s,code:this.code,status:this.status}}};Z.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Z.ERR_BAD_OPTION="ERR_BAD_OPTION";Z.ECONNABORTED="ECONNABORTED";Z.ETIMEDOUT="ETIMEDOUT";Z.ECONNREFUSED="ECONNREFUSED";Z.ERR_NETWORK="ERR_NETWORK";Z.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Z.ERR_DEPRECATED="ERR_DEPRECATED";Z.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Z.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Z.ERR_CANCELED="ERR_CANCELED";Z.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Z.ERR_INVALID_URL="ERR_INVALID_URL";Z.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const _R=null,qw=100;function _f(e){return D.isPlainObject(e)||D.isArray(e)}function Qw(e){return D.endsWith(e,"[]")?e.slice(0,-2):e}function Ad(e,t,n){return e?e.concat(t).map(function(o,l){return o=Qw(o),!n&&l?"["+o+"]":o}).join(n?".":""):t}function kR(e){return D.isArray(e)&&!e.some(_f)}const PR=D.toFlatObject(D,{},null,function(t){return/^is[A-Z]/.test(t)});function yc(e,t,n){if(!D.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=D.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(R,k){return!D.isUndefined(k[R])});const s=n.metaTokens,o=n.visitor||P,l=n.dots,c=n.indexes,d=n.Blob||typeof Blob<"u"&&Blob,f=n.maxDepth===void 0?qw:n.maxDepth,p=d&&D.isSpecCompliantForm(t),g=[];if(!D.isFunction(o))throw new TypeError("visitor must be a function");function y(S){if(S===null)return"";if(D.isDate(S))return S.toISOString();if(D.isBoolean(S))return S.toString();if(!p&&D.isBlob(S))throw new Z("Blob is not supported. Use a Buffer instead.");if(D.isArrayBuffer(S)||D.isTypedArray(S)){if(p&&typeof d=="function")return new d([S]);if(typeof Buffer<"u")return Buffer.from(S);throw new Z("Blob is not supported. Use a Buffer instead.",Z.ERR_NOT_SUPPORT)}return S}function x(S){if(S>f)throw new Z("Object is too deeply nested ("+S+" levels). Max depth: "+f,Z.ERR_FORM_DATA_DEPTH_EXCEEDED)}function E(S,R){if(f===1/0)return JSON.stringify(S);const k=[];return JSON.stringify(S,function(M,U){if(!D.isObject(U))return U;for(;k.length&&k[k.length-1]!==this;)k.pop();return k.push(U),x(R+k.length-1),U})}function P(S,R,k){let A=S;if(D.isReactNative(t)&&D.isReactNativeBlob(S))return t.append(Ad(k,R,l),y(S)),!1;if(S&&!k&&typeof S=="object"){if(D.endsWith(R,"{}"))R=s?R:R.slice(0,-2),S=E(S,1);else if(D.isArray(S)&&kR(S)||(D.isFileList(S)||D.endsWith(R,"[]"))&&(A=D.toArray(S)))return R=Qw(R),A.forEach(function(U,W){!(D.isUndefined(U)||U===null)&&t.append(c===!0?Ad([R],W,l):c===null?R:R+"[]",y(U))}),!1}return _f(S)?!0:(t.append(Ad(k,R,l),y(S)),!1)}const C=Object.assign(PR,{defaultVisitor:P,convertValue:y,isVisitable:_f});function b(S,R,k=0){if(!D.isUndefined(S)){if(x(k),g.indexOf(S)!==-1)throw new Error("Circular reference detected in "+R.join("."));g.push(S),D.forEach(S,function(M,U){(!(D.isUndefined(M)||M===null)&&o.call(t,M,D.isString(U)?U.trim():U,R,C))===!0&&b(M,R?R.concat(U):[U],k+1)}),g.pop()}}if(!D.isObject(e))throw new TypeError("data must be an object");return b(e),t}function Ky(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(s){return t[s]})}function xh(e,t){this._pairs=[],e&&yc(e,this,t)}const Kw=xh.prototype;Kw.append=function(t,n){this._pairs.push([t,n])};Kw.toString=function(t){const n=t?s=>t.call(this,s,Ky):Ky;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function RR(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Gw(e,t,n){if(!t)return e;e=e||"";const s=D.isFunction(n)?{serialize:n}:n,o=D.getSafeProp(s,"encode")||RR,l=D.getSafeProp(s,"serialize");let c;if(l?c=l(t,s):c=D.isURLSearchParams(t)?t.toString():new xh(t,s).toString(o),c){const d=e.indexOf("#");d!==-1&&(e=e.slice(0,d)),e+=(e.indexOf("?")===-1?"?":"&")+c}return e}class Gy{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){D.forEach(this.handlers,function(s){s!==null&&t(s)})}}const wh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},AR=typeof URLSearchParams<"u"?URLSearchParams:xh,NR=typeof FormData<"u"?FormData:null,OR=typeof Blob<"u"?Blob:null,jR={isBrowser:!0,classes:{URLSearchParams:AR,FormData:NR,Blob:OR},protocols:["http","https","file","blob","url","data"]},bh=typeof window<"u"&&typeof document<"u",kf=typeof navigator=="object"&&navigator||void 0,LR=bh&&(!kf||["ReactNative","NativeScript","NS"].indexOf(kf.product)<0),DR=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",MR=bh&&window.location.href||"http://localhost",IR=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:bh,hasStandardBrowserEnv:LR,hasStandardBrowserWebWorkerEnv:DR,navigator:kf,origin:MR},Symbol.toStringTag,{value:"Module"})),xt={...IR,...jR};function FR(e,t){return yc(e,new xt.classes.URLSearchParams,{visitor:function(n,s,o,l){return xt.isNode&&D.isBuffer(n)?(this.append(s,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...t})}const Yy=qw;function Yw(e){if(e>Yy)throw new Z("FormData field is too deeply nested ("+e+" levels). Max depth: "+Yy,Z.ERR_FORM_DATA_DEPTH_EXCEEDED)}function VR(e){const t=[],n=/\w+|\[(\w*)]/g;let s;for(;(s=n.exec(e))!==null;)Yw(t.length),t.push(s[0]==="[]"?"":s[1]||s[0]);return t}function BR(e){const t={},n=Object.keys(e);let s;const o=n.length;let l;for(s=0;s=n.length;return c=!c&&D.isArray(o)?o.length:c,f?(D.hasOwnProp(o,c)?o[c]=D.isArray(o[c])?o[c].concat(s):[o[c],s]:o[c]=s,!d):((!D.hasOwnProp(o,c)||!D.isObject(o[c]))&&(o[c]=[]),t(n,s,o[c],l)&&D.isArray(o[c])&&(o[c]=BR(o[c])),!d)}if(D.isFormData(e)&&D.isFunction(e.entries)){const n={};return D.forEachEntry(e,(s,o)=>{t(VR(s),o,n,0)}),n}return null}const ii=(e,t)=>e!=null&&D.hasOwnProp(e,t)?e[t]:void 0;function UR(e,t,n){if(D.isString(e))try{return(t||JSON.parse)(e),D.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(e)}const ca={transitional:wh,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const s=n.getContentType()||"",o=s.indexOf("application/json")>-1,l=D.isObject(t);if(l&&D.isHTMLForm(t)&&(t=new FormData(t)),D.isFormData(t))return o?JSON.stringify(Xw(t)):t;if(D.isArrayBuffer(t)||D.isBuffer(t)||D.isStream(t)||D.isFile(t)||D.isBlob(t)||D.isReadableStream(t))return t;if(D.isArrayBufferView(t))return t.buffer;if(D.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(l){const f=ii(this,"formSerializer");if(s.indexOf("application/x-www-form-urlencoded")>-1)return FR(t,f).toString();if((d=D.isFileList(t))||s.indexOf("multipart/form-data")>-1){const p=ii(this,"env"),g=p&&p.FormData;return yc(d?{"files[]":t}:t,g&&new g,f)}}return l||o?(n.setContentType("application/json",!1),UR(t)):t}],transformResponse:[function(t){const n=ii(this,"transitional")||ca.transitional,s=n&&n.forcedJSONParsing,o=ii(this,"responseType"),l=o==="json";if(D.isResponse(t)||D.isReadableStream(t))return t;if(t&&D.isString(t)&&(s&&!o||l)){const d=!(n&&n.silentJSONParsing)&&l;try{return JSON.parse(t,ii(this,"parseReviver"))}catch(f){if(d)throw f.name==="SyntaxError"?Z.from(f,Z.ERR_BAD_RESPONSE,this,null,ii(this,"response")):f}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xt.classes.FormData,Blob:xt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};D.forEach(["delete","get","head","post","put","patch","query"],e=>{ca.headers[e]={}});function Nd(e,t){const n=this||ca,s=t||n,o=Pt.from(s.headers);let l=s.data;return D.forEach(e,function(d){l=d.call(n,l,o.normalize(),t?t.status:void 0)}),o.normalize(),l}function Zw(e){return!!(e&&e.__CANCEL__)}let ua=class extends Z{constructor(t,n,s){super(t??"canceled",Z.ERR_CANCELED,n,s),this.name="CanceledError",this.__CANCEL__=!0}};function Jw(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new Z("Request failed with status code "+n.status,n.status>=400&&n.status<500?Z.ERR_BAD_REQUEST:Z.ERR_BAD_RESPONSE,n.config,n.request,n))}function zR(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function $R(e,t){e=e||10;const n=new Array(e),s=new Array(e);let o=0,l=0,c;return t=t!==void 0?t:1e3,function(f){const p=Date.now(),g=s[l];c||(c=p),n[o]=f,s[o]=p;let y=l,x=0;for(;y!==o;)x+=n[y++],y=y%e;if(o=(o+1)%e,o===l&&(l=(l+1)%e),p-c{n=g,o=null,l&&(clearTimeout(l),l=null),e(...p)};return[(...p)=>{const g=Date.now(),y=g-n;y>=s?c(p,g):(o=p,l||(l=setTimeout(()=>{l=null,c(o)},s-y)))},()=>o&&c(o)]}const sc=(e,t,n=3)=>{let s=0;const o=$R(50,250);return HR(l=>{if(!l||typeof l.loaded!="number")return;const c=l.loaded,d=l.lengthComputable?l.total:void 0,f=d!=null?Math.min(c,d):c,p=Math.max(0,f-s),g=o(p);s=Math.max(s,f);const y={loaded:f,total:d,progress:d?f/d:void 0,bytes:p,rate:g||void 0,estimated:g&&d?(d-f)/g:void 0,event:l,lengthComputable:d!=null,[t?"download":"upload"]:!0};e(y)},n)},Xy=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},Zy=e=>(...t)=>D.asap(()=>e(...t)),WR=xt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,xt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(xt.origin),xt.navigator&&/(msie|trident)/i.test(xt.navigator.userAgent)):()=>!0,qR=xt.hasStandardBrowserEnv?{write(e,t,n,s,o,l,c){if(typeof document>"u")return;const d=[`${e}=${encodeURIComponent(t)}`];D.isNumber(n)&&d.push(`expires=${new Date(n).toUTCString()}`),D.isString(s)&&d.push(`path=${s}`),D.isString(o)&&d.push(`domain=${o}`),l===!0&&d.push("secure"),D.isString(c)&&d.push(`SameSite=${c}`),document.cookie=d.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;ne instanceof Pt?{...e}:e;function Ns(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function s(g,y,x,E){return D.isPlainObject(g)&&D.isPlainObject(y)?D.merge.call({caseless:E},g,y):D.isPlainObject(y)?D.merge({},y):D.isArray(y)?y.slice():y}function o(g,y,x,E){if(D.isUndefined(y)){if(!D.isUndefined(g))return s(void 0,g,x,E)}else return s(g,y,x,E)}function l(g,y){if(!D.isUndefined(y))return s(void 0,y)}function c(g,y){if(D.isUndefined(y)){if(!D.isUndefined(g))return s(void 0,g)}else return s(void 0,y)}function d(g){const y=D.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!D.isUndefined(y))if(D.isPlainObject(y)){if(D.hasOwnProp(y,g))return y[g]}else return;const x=D.hasOwnProp(e,"transitional")?e.transitional:void 0;if(D.isPlainObject(x)&&D.hasOwnProp(x,g))return x[g]}function f(g,y,x){if(D.hasOwnProp(t,x))return s(g,y);if(D.hasOwnProp(e,x))return s(void 0,g)}const p={url:l,method:l,data:l,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,allowedSocketPaths:c,responseEncoding:c,validateStatus:f,headers:(g,y,x)=>o(ev(g),ev(y),x,!0)};return D.forEach(Object.keys({...e,...t}),function(y){if(y==="__proto__"||y==="constructor"||y==="prototype")return;const x=D.hasOwnProp(p,y)?p[y]:o,E=D.hasOwnProp(e,y)?e[y]:void 0,P=D.hasOwnProp(t,y)?t[y]:void 0,C=x(E,P,y);D.isUndefined(C)&&x!==f||(n[y]=C)}),D.hasOwnProp(t,"validateStatus")&&D.isUndefined(t.validateStatus)&&d("validateStatusUndefinedResolves")===!1&&(D.hasOwnProp(e,"validateStatus")?n.validateStatus=s(void 0,e.validateStatus):delete n.validateStatus),n}const JR=["content-type","content-length"];function eA(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([s,o])=>{JR.includes(s.toLowerCase())&&e.set(s,o)})}const tA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function t1(e){const t=Ns({},e),n=x=>D.hasOwnProp(t,x)?t[x]:void 0,s=n("data");let o=n("withXSRFToken");const l=n("xsrfHeaderName"),c=n("xsrfCookieName");let d=n("headers");const f=n("auth"),p=n("baseURL"),g=n("allowAbsoluteUrls"),y=n("url");if(t.headers=d=Pt.from(d),t.url=Gw(e1(p,y,g,t),n("params"),n("paramsSerializer")),f){const x=D.getSafeProp(f,"username")||"",E=D.getSafeProp(f,"password")||"";try{d.set("Authorization","Basic "+btoa(x+":"+(E?tA(E):"")))}catch(P){throw Z.from(P,Z.ERR_BAD_OPTION_VALUE,e)}}if(D.isFormData(s)&&(xt.hasStandardBrowserEnv||xt.hasStandardBrowserWebWorkerEnv||D.isReactNative(s)?d.setContentType(void 0):D.isFunction(s.getHeaders)&&eA(d,s.getHeaders(),n("formDataHeaderPolicy"))),xt.hasStandardBrowserEnv&&(D.isFunction(o)&&(o=o(t)),o===!0||o==null&&WR(t.url))){const E=l&&c&&qR.read(c);E&&d.set(l,E)}return t}const nA=typeof XMLHttpRequest<"u",rA=nA&&function(e){return new Promise(function(n,s){const o=t1(e);let l=o.data;const c=Pt.from(o.headers).normalize();let{responseType:d,onUploadProgress:f,onDownloadProgress:p}=o,g,y,x,E,P;function C(){E&&E(),P&&P(),o.cancelToken&&o.cancelToken.unsubscribe(g),o.signal&&o.signal.removeEventListener("abort",g)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function S(){if(!b)return;const k=Pt.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),M={data:!d||d==="text"||d==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:k,config:e,request:b};Jw(function(W){n(W),C()},function(W){s(W),C()},M),b=null}"onloadend"in b?b.onloadend=S:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.startsWith("file:"))||setTimeout(S)},b.onabort=function(){b&&(s(new Z("Request aborted",Z.ECONNABORTED,e,b)),C(),b=null)},b.onerror=function(A){const M=A&&A.message?A.message:"Network Error",U=new Z(M,Z.ERR_NETWORK,e,b);U.event=A||null,s(U),C(),b=null},b.ontimeout=function(){let A=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const M=o.transitional||wh;o.timeoutErrorMessage&&(A=o.timeoutErrorMessage),s(new Z(A,M.clarifyTimeoutError?Z.ETIMEDOUT:Z.ECONNABORTED,e,b)),C(),b=null},l===void 0&&c.setContentType(null),"setRequestHeader"in b&&D.forEach(Hw(c),function(A,M){b.setRequestHeader(M,A)}),D.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),d&&d!=="json"&&(b.responseType=o.responseType),p&&([x,P]=sc(p,!0),b.addEventListener("progress",x)),f&&b.upload&&([y,E]=sc(f),b.upload.addEventListener("progress",y),b.upload.addEventListener("loadend",E)),(o.cancelToken||o.signal)&&(g=k=>{b&&(s(!k||k.type?new ua(null,e,b):k),b.abort(),C(),b=null)},o.cancelToken&&o.cancelToken.subscribe(g),o.signal&&(o.signal.aborted?g():o.signal.addEventListener("abort",g)));const R=zR(o.url);if(R&&!xt.protocols.includes(R)){s(new Z("Unsupported protocol "+R+":",Z.ERR_BAD_REQUEST,e)),C();return}b.send(l||null)})},sA=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let s=!1;const o=function(f){if(!s){s=!0,c();const p=f instanceof Error?f:this.reason;n.abort(p instanceof Z?p:new ua(p instanceof Error?p.message:p))}};let l=t&&setTimeout(()=>{l=null,o(new Z(`timeout of ${t}ms exceeded`,Z.ETIMEDOUT))},t);const c=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),e=null)};e.forEach(f=>f.addEventListener("abort",o,{once:!0}));const{signal:d}=n;return d.unsubscribe=()=>D.asap(c),d},iA=function*(e,t){let n=e.byteLength;if(n{const o=oA(e,t);let l=0,c,d=f=>{c||(c=!0,s&&s(f))};return new ReadableStream({async pull(f){try{const{done:p,value:g}=await o.next();if(p){d(),f.close();return}let y=g.byteLength;if(n){let x=l+=y;n(x)}f.enqueue(new Uint8Array(g))}catch(p){throw d(p),p}},cancel(f){return d(f),o.return()}},{highWaterMark:2})},ic=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,lA=(e,t,n)=>t+2E>=2&&s.charCodeAt(E-2)===37&&s.charCodeAt(E-1)===51&&(s.charCodeAt(E)===68||s.charCodeAt(E)===100);p>=0&&(s.charCodeAt(p)===61?(f++,p--):g(p)&&(f++,p-=3)),f===1&&p>=0&&(s.charCodeAt(p)===61||g(p))&&f++;const x=Math.floor(c/4)*3-(f||0);return x>0?x:0}let l=0;for(let c=0,d=s.length;c=55296&&f<=56319&&c+1=56320&&p<=57343?(l+=4,c++):l+=3}else l+=3}return l}const Sh="1.18.1",nv=64*1024,{isFunction:Al}=D,uA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),rv=e=>{if(!D.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},sv=(e,...t)=>{try{return!!e(...t)}catch{return!1}},dA=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},fA=e=>{const t=D.global!==void 0&&D.global!==null?D.global:globalThis,{ReadableStream:n,TextEncoder:s}=t;e=D.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:l,Response:c}=e,d=o?Al(o):typeof fetch=="function",f=Al(l),p=Al(c);if(!d)return!1;const g=d&&Al(n),y=d&&(typeof s=="function"?(S=>R=>S.encode(R))(new s):async S=>new Uint8Array(await new l(S).arrayBuffer())),x=f&&g&&sv(()=>{let S=!1;const R=new l(xt.origin,{body:new n,method:"POST",get duplex(){return S=!0,"half"}}),k=R.headers.has("Content-Type");return R.body!=null&&R.body.cancel(),S&&!k}),E=p&&g&&sv(()=>D.isReadableStream(new c("").body)),P={stream:E&&(S=>S.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!P[S]&&(P[S]=(R,k)=>{let A=R&&R[S];if(A)return A.call(R);throw new Z(`Response type '${S}' is not supported`,Z.ERR_NOT_SUPPORT,k)})});const C=async S=>{if(S==null)return 0;if(D.isBlob(S))return S.size;if(D.isSpecCompliantForm(S))return(await new l(xt.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(D.isArrayBufferView(S)||D.isArrayBuffer(S))return S.byteLength;if(D.isURLSearchParams(S)&&(S=S+""),D.isString(S))return(await y(S)).byteLength},b=async(S,R)=>{const k=D.toFiniteNumber(S.getContentLength());return k??C(R)};return async S=>{let{url:R,method:k,data:A,signal:M,cancelToken:U,timeout:W,onDownloadProgress:V,onUploadProgress:Y,responseType:ne,headers:ve,withCredentials:_e="same-origin",fetchOptions:be,maxContentLength:J,maxBodyLength:Te}=t1(S);const Ce=D.isNumber(J)&&J>-1,ue=D.isNumber(Te)&&Te>-1,K=X=>D.hasOwnProp(S,X)?S[X]:void 0;let se=o||fetch;ne=ne?(ne+"").toLowerCase():"text";let z=sA([M,U&&U.toAbortSignal()],W),L=null;const $=z&&z.unsubscribe&&(()=>{z.unsubscribe()});let de,ge=null;const pe=()=>new Z("Request body larger than maxBodyLength limit",Z.ERR_BAD_REQUEST,S,L);try{let X;const Se=K("auth");if(Se){const Ee=D.getSafeProp(Se,"username")||"",pt=D.getSafeProp(Se,"password")||"";X={username:Ee,password:pt}}if(dA(R)){const Ee=new URL(R,xt.origin);if(!X&&(Ee.username||Ee.password)){const pt=rv(Ee.username),fn=rv(Ee.password);X={username:pt,password:fn}}(Ee.username||Ee.password)&&(Ee.username="",Ee.password="",R=Ee.href)}if(X&&(ve.delete("authorization"),ve.set("Authorization","Basic "+btoa(uA((X.username||"")+":"+(X.password||""))))),Ce&&typeof R=="string"&&R.startsWith("data:")&&cA(R)>J)throw new Z("maxContentLength size of "+J+" exceeded",Z.ERR_BAD_RESPONSE,S,L);if(ue&&k!=="get"&&k!=="head"){const Ee=await C(A);if(typeof Ee=="number"&&isFinite(Ee)&&(de=Ee,Ee>Te))throw pe()}const Re=ue&&(D.isReadableStream(A)||D.isStream(A)),we=(Ee,pt,fn)=>tv(Ee,nv,hn=>{if(ue&&hn>Te)throw ge=pe();pt&&pt(hn)},fn);if(x&&k!=="get"&&k!=="head"&&(Y||Re)){if(de=de??await b(ve,A),de!==0||Re){let Ee=new l(R,{method:"POST",body:A,duplex:"half"}),pt;if(D.isFormData(A)&&(pt=Ee.headers.get("content-type"))&&ve.setContentType(pt),Ee.body){const[fn,hn]=Y&&Xy(de,sc(Zy(Y)))||[];A=we(Ee.body,fn,hn)}}}else if(Re&&!f&&g&&k!=="get"&&k!=="head")A=we(A);else if(Re&&f&&!x&&k!=="get"&&k!=="head")throw new Z("Stream request bodies are not supported by the current fetch implementation",Z.ERR_NOT_SUPPORT,S,L);D.isString(_e)||(_e=_e?"include":"omit");const ot=f&&"credentials"in l.prototype;if(D.isFormData(A)){const Ee=ve.getContentType();Ee&&/^multipart\/form-data/i.test(Ee)&&!/boundary=/i.test(Ee)&&ve.delete("content-type")}ve.set("User-Agent","axios/"+Sh,!1);const Yt={...be,signal:z,method:k.toUpperCase(),headers:Hw(ve.normalize()),body:A,duplex:"half",credentials:ot?_e:void 0};L=f&&new l(R,Yt);let ht=await(f?se(L,be):se(R,Yt));const dn=Pt.from(ht.headers);if(Ce){const Ee=D.toFiniteNumber(dn.getContentLength());if(Ee!=null&&Ee>J)throw new Z("maxContentLength size of "+J+" exceeded",Z.ERR_BAD_RESPONSE,S,L)}const Xt=E&&(ne==="stream"||ne==="response");if(E&&ht.body&&(V||Ce||Xt&&$)){const Ee={};["status","statusText","headers"].forEach(zn=>{Ee[zn]=ht[zn]});const pt=D.toFiniteNumber(dn.getContentLength()),[fn,hn]=V&&Xy(pt,sc(Zy(V),!0))||[];let ir=0;const or=zn=>{if(Ce&&(ir=zn,ir>J))throw new Z("maxContentLength size of "+J+" exceeded",Z.ERR_BAD_RESPONSE,S,L);fn&&fn(zn)};ht=new c(tv(ht.body,nv,or,()=>{hn&&hn(),$&&$()}),Ee)}ne=ne||"text";let Zt=await P[D.findKey(P,ne)||"text"](ht,S);if(Ce&&!E&&!Xt){let Ee;if(Zt!=null&&(typeof Zt.byteLength=="number"?Ee=Zt.byteLength:typeof Zt.size=="number"?Ee=Zt.size:typeof Zt=="string"&&(Ee=typeof s=="function"?new s().encode(Zt).byteLength:Zt.length)),typeof Ee=="number"&&Ee>J)throw new Z("maxContentLength size of "+J+" exceeded",Z.ERR_BAD_RESPONSE,S,L)}return!Xt&&$&&$(),await new Promise((Ee,pt)=>{Jw(Ee,pt,{data:Zt,headers:Pt.from(ht.headers),status:ht.status,statusText:ht.statusText,config:S,request:L})})}catch(X){if($&&$(),z&&z.aborted&&z.reason instanceof Z){const Se=z.reason;throw Se.config=S,L&&(Se.request=L),X!==Se&&Object.defineProperty(Se,"cause",{__proto__:null,value:X,writable:!0,enumerable:!1,configurable:!0}),Se}if(ge)throw L&&!ge.request&&(ge.request=L),ge;if(X instanceof Z)throw L&&!X.request&&(X.request=L),X;if(X&&X.name==="TypeError"&&/Load failed|fetch/i.test(X.message)){const Se=new Z("Network Error",Z.ERR_NETWORK,S,L,X&&X.response);throw Object.defineProperty(Se,"cause",{__proto__:null,value:X.cause||X,writable:!0,enumerable:!1,configurable:!0}),Se}throw Z.from(X,X&&X.code,S,L,X&&X.response)}}},hA=new Map,n1=e=>{let t=e&&e.env||{};const{fetch:n,Request:s,Response:o}=t,l=[s,o,n];let c=l.length,d=c,f,p,g=hA;for(;d--;)f=l[d],p=g.get(f),p===void 0&&g.set(f,p=d?new Map:fA(t)),g=p;return p};n1();const Eh={http:_R,xhr:rA,fetch:{get:n1}};D.forEach(Eh,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const iv=e=>`- ${e}`,pA=e=>D.isFunction(e)||e===null||e===!1;function mA(e,t){e=D.isArray(e)?e:[e];const{length:n}=e;let s,o;const l={};for(let c=0;c`adapter ${f} `+(p===!1?"is not supported by the environment":"is not available in the build"));let d=n?c.length>1?`since : `+c.map(iv).join(` `):" "+iv(c[0]):"as no adapter specified";throw new Z("There is no suitable adapter to dispatch the request "+d,Z.ERR_NOT_SUPPORT)}return o}const r1={getAdapter:mA,adapters:Eh};function Od(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ua(null,e)}function ov(e){return Od(e),e.headers=Pt.from(e.headers),e.data=Nd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),r1.getAdapter(e.adapter||ca.adapter,e)(e).then(function(s){Od(e),e.response=s;try{s.data=Nd.call(e,e.transformResponse,s)}finally{delete e.response}return s.headers=Pt.from(s.headers),s},function(s){if(!Zw(s)&&(Od(e),s&&s.response)){e.response=s.response;try{s.response.data=Nd.call(e,e.transformResponse,s.response)}finally{delete e.response}s.response.headers=Pt.from(s.response.headers)}return Promise.reject(s)})}const vc={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{vc[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const av={};vc.transitional=function(t,n,s){function o(l,c){return"[Axios v"+Sh+"] Transitional option '"+l+"'"+c+(s?". "+s:"")}return(l,c,d)=>{if(t===!1)throw new Z(o(c," has been removed"+(n?" in "+n:"")),Z.ERR_DEPRECATED);return n&&!av[c]&&(av[c]=!0,console.warn(o(c," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(l,c,d):!0}};vc.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function gA(e,t,n){if(typeof e!="object"||e===null)throw new Z("options must be an object",Z.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let o=s.length;for(;o-- >0;){const l=s[o],c=Object.prototype.hasOwnProperty.call(t,l)?t[l]:void 0;if(c){const d=e[l],f=d===void 0||c(d,l,e);if(f!==!0)throw new Z("option "+l+" must be "+f,Z.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Z("Unknown option "+l,Z.ERR_BAD_OPTION)}}const $l={assertOptions:gA,validators:vc},Ct=$l.validators;let Cs=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Gy,response:new Gy}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const l=(()=>{if(!o.stack)return"";const c=o.stack.indexOf(` `);return c===-1?"":o.stack.slice(c+1)})();try{if(!s.stack)s.stack=l;else if(l){const c=l.indexOf(` `),d=c===-1?-1:l.indexOf(` `,c+1),f=d===-1?"":l.slice(d+1);String(s.stack).endsWith(f)||(s.stack+=` `+l)}}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ns(this.defaults,n);const{transitional:s,paramsSerializer:o,headers:l}=n;s!==void 0&&$l.assertOptions(s,{silentJSONParsing:Ct.transitional(Ct.boolean),forcedJSONParsing:Ct.transitional(Ct.boolean),clarifyTimeoutError:Ct.transitional(Ct.boolean),legacyInterceptorReqResOrdering:Ct.transitional(Ct.boolean),advertiseZstdAcceptEncoding:Ct.transitional(Ct.boolean),validateStatusUndefinedResolves:Ct.transitional(Ct.boolean)},!1),o!=null&&(D.isFunction(o)?n.paramsSerializer={serialize:o}:$l.assertOptions(o,{encode:Ct.function,serialize:Ct.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),$l.assertOptions(n,{baseUrl:Ct.spelling("baseURL"),withXsrfToken:Ct.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let c=l&&D.merge(l.common,l[n.method]);l&&D.forEach(["delete","get","head","post","put","patch","query","common"],P=>{delete l[P]}),n.headers=Pt.concat(c,l);const d=[];let f=!0;this.interceptors.request.forEach(function(C){if(typeof C.runWhen=="function"&&C.runWhen(n)===!1)return;f=f&&C.synchronous;const b=n.transitional||wh;b&&b.legacyInterceptorReqResOrdering?d.unshift(C.fulfilled,C.rejected):d.push(C.fulfilled,C.rejected)});const p=[];this.interceptors.response.forEach(function(C){p.push(C.fulfilled,C.rejected)});let g,y=0,x;if(!f){const P=[ov.bind(this),void 0];for(P.unshift(...d),P.push(...p),x=P.length,g=Promise.resolve(n);y{if(!s._listeners)return;let l=s._listeners.length;for(;l-- >0;)s._listeners[l](o);s._listeners=null}),this.promise.then=o=>{let l;const c=new Promise(d=>{s.subscribe(d),l=d}).then(o);return c.cancel=function(){s.unsubscribe(l)},c},t(function(l,c,d){s.reason||(s.reason=new ua(l,c,d),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new s1(function(o){t=o}),cancel:t}}};function vA(e){return function(n){return e.apply(null,n)}}function xA(e){return D.isObject(e)&&e.isAxiosError===!0}const Pf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Pf).forEach(([e,t])=>{Pf[t]=e});function i1(e){const t=new Cs(e),n=Dw(Cs.prototype.request,t);return D.extend(n,Cs.prototype,t,{allOwnKeys:!0}),D.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return i1(Ns(e,o))},n}const Je=i1(ca);Je.Axios=Cs;Je.CanceledError=ua;Je.CancelToken=yA;Je.isCancel=Zw;Je.VERSION=Sh;Je.toFormData=yc;Je.AxiosError=Z;Je.Cancel=Je.CanceledError;Je.all=function(t){return Promise.all(t)};Je.spread=vA;Je.isAxiosError=xA;Je.mergeConfig=Ns;Je.AxiosHeaders=Pt;Je.formToJSON=e=>Xw(D.isHTMLForm(e)?new FormData(e):e);Je.getAdapter=r1.getAdapter;Je.HttpStatusCode=Pf;Je.default=Je;const{Axios:_I,AxiosError:kI,CanceledError:PI,isCancel:RI,CancelToken:AI,VERSION:NI,all:OI,Cancel:jI,isAxiosError:LI,spread:DI,toFormData:MI,AxiosHeaders:II,HttpStatusCode:FI,formToJSON:VI,getAdapter:BI,mergeConfig:UI,create:zI}=Je,o1=typeof window>"u",lv=!o1&&window.self!==window.top,wA=!o1&&typeof document>"u",jd=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),yt=[];for(let e=0;e<256;++e)yt.push((e+256).toString(16).slice(1));function bA(e,t=0){return(yt[e[t+0]]+yt[e[t+1]]+yt[e[t+2]]+yt[e[t+3]]+"-"+yt[e[t+4]]+yt[e[t+5]]+"-"+yt[e[t+6]]+yt[e[t+7]]+"-"+yt[e[t+8]]+yt[e[t+9]]+"-"+yt[e[t+10]]+yt[e[t+11]]+yt[e[t+12]]+yt[e[t+13]]+yt[e[t+14]]+yt[e[t+15]]).toLowerCase()}let Ld;const SA=new Uint8Array(16);function EA(){if(!Ld){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ld=crypto.getRandomValues.bind(crypto)}return Ld(SA)}const CA=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),cv={randomUUID:CA};function TA(e,t,n){var o;e=e||{};const s=e.random??((o=e.rng)==null?void 0:o.call(e))??EA();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,bA(s)}function _A(e,t,n){return cv.randomUUID&&!e?cv.randomUUID():TA(e)}const To=typeof window<"u"?window:{base44SharedInstances:{}};function kA(e,t){return To.base44SharedInstances||(To.base44SharedInstances={}),To.base44SharedInstances[e]||(To.base44SharedInstances[e]={instance:t()}),To.base44SharedInstances[e].instance}const PA="__user_heartbeat_event__",RA="__initialization_event__",AA="__session_duration_event__",uv="analytics-enable",dv="base44_analytics_session_id",NA={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},OA="analytics",Ve=kA(OA,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...NA,...BA()}})),jA=({axiosClient:e,serverUrl:t,appId:n,userAuthModule:s})=>{var o;const{maxQueueSize:l,throttleTime:c,batchSize:d}=Ve.config;if(!(!((o=Ve.config)===null||o===void 0)&&o.enabled)||wA)return{track:()=>{},cleanup:()=>{}};let f;const p=`${t}/api/apps/${n}/analytics/track/batch`,g=async k=>{await e.request({method:"POST",url:`/apps/${n}/analytics/track/batch`,data:{events:k}})},y=k=>{try{const A=JSON.stringify({events:k}),M=new Blob([A],{type:"application/json"});return typeof navigator>"u"||A.length>6e4||!navigator.sendBeacon(p,M)}catch{return!1}},x=async(k,A={})=>{if(k.length===0)return;const M=await VA(s),U=k.map(FA(M));try{(!A.isBeacon||!y(U))&&await g(U)}catch{}},E=()=>{hv(x,{throttleTime:c,batchSize:d})},P=k=>{if(Ve.requestsQueue.length>=l)return;const A=IA();Ve.requestsQueue.push({...k,...A}),E()},C=()=>{hv(x,{throttleTime:c,batchSize:d}),f=pv(P),DA()},b=()=>{fv(),f==null||f(),MA(P);const k=Ve.requestsQueue.splice(0);x(k,{isBeacon:!0})},S=()=>{typeof window>"u"||(document.visibilityState==="hidden"?b():document.visibilityState==="visible"&&C())},R=()=>{fv(),f==null||f(),typeof window<"u"&&window.removeEventListener("visibilitychange",S)};return E(),f=pv(P),LA(P),typeof window<"u"&&window.addEventListener("visibilitychange",S),{track:P,cleanup:R}};function fv(){Ve.isProcessing=!1}async function hv(e,t){if(Ve.isProcessing)return;Ve.isProcessing=!0;const{throttleTime:n=1e3,batchSize:s=30}=t??{};for(;Ve.isProcessing&&Ve.requestsQueue.length>0;){const o=Ve.requestsQueue.splice(0,s);o.length&&await e(o),await new Promise(l=>setTimeout(l,n))}Ve.isProcessing=!1}function pv(e){var t;if(Ve.isHeartBeatProcessing||((t=Ve.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};Ve.isHeartBeatProcessing=!0;const n=setInterval(()=>{e({eventName:PA})},Ve.config.heartBeatInterval);return()=>{clearInterval(n),Ve.isHeartBeatProcessing=!1}}function LA(e){typeof window>"u"||Ve.wasInitializationTracked||(Ve.wasInitializationTracked=!0,e({eventName:RA,properties:{referrer:document==null?void 0:document.referrer}}))}function DA(){typeof window>"u"||Ve.sessionStartTime!==null||(Ve.sessionStartTime=new Date().toISOString())}function MA(e){if(typeof window>"u"||Ve.sessionStartTime===null)return;const t=new Date().getTime()-new Date(Ve.sessionStartTime).getTime();Ve.sessionStartTime=null,e({eventName:AA,properties:{sessionDuration:t}})}function IA(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function FA(e){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...e})}let Dd=null;async function VA(e){if(!Ve.sessionContext){if(!Dd){const t=Ch();Dd=e.me().then(n=>({user_id:n.id,session_id:t})).catch(()=>({user_id:null,session_id:t}))}Ve.sessionContext=await Dd}return Ve.sessionContext}function BA(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(uv);if(t==null||!t.length)return;const n=new URLSearchParams(window.location.search);n.delete(uv);const s=window.location.pathname+(n.toString()?"?"+n.toString():"");return window.history.replaceState({},"",s),{enabled:t==="true"}}function Ch(){if(typeof window>"u")return jd();try{const e=localStorage.getItem(dv);if(!e){const t=jd();return localStorage.setItem(dv,t),t}return e}catch{return jd()}}class UA extends Error{constructor(t,n,s,o,l){super(t),this.name="Base44Error",this.status=n,this.code=s,this.data=o,this.originalError=l}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function Ao({baseURL:e,headers:t={},token:n,interceptResponses:s=!0,onError:o}){const l=Je.create({baseURL:e,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return n&&(l.defaults.headers.common.Authorization=`Bearer ${n}`),l.interceptors.request.use(c=>{typeof window<"u"&&window.location&&(c.headers.set("X-Origin-URL",window.location.href),c.headers.get("Authorization")||c.headers.set("X-Base44-Anonymous-Id",Ch()));const d=_A();if(c.requestId=d,lv)try{window.parent.postMessage({type:"api-request-start",requestId:d,data:{url:e+c.url,method:c.method,body:c.data instanceof FormData?"[FormData object]":c.data}},"*")}catch{}return c}),s&&l.interceptors.response.use(c=>{var d;const f=(d=c.config)===null||d===void 0?void 0:d.requestId;try{lv&&f&&window.parent.postMessage({type:"api-request-end",requestId:f,data:{statusCode:c.status,response:c.data}},"*")}catch{}return c.data},c=>{var d,f,p,g,y,x,E,P;const C=((f=(d=c.response)===null||d===void 0?void 0:d.data)===null||f===void 0?void 0:f.message)||((g=(p=c.response)===null||p===void 0?void 0:p.data)===null||g===void 0?void 0:g.detail)||c.message,b=new UA(C,(y=c.response)===null||y===void 0?void 0:y.status,(E=(x=c.response)===null||x===void 0?void 0:x.data)===null||E===void 0?void 0:E.code,(P=c.response)===null||P===void 0?void 0:P.data,c);return o==null||o(b),Promise.reject(b)}),l}function mv(e){const{axios:t,appId:n,getSocket:s}=e;return new Proxy({},{get(o,l){if(!(typeof l!="string"||l==="then"||l.startsWith("_")))return $A(t,n,l,s)}})}function zA(e){var t;try{const n=JSON.parse(e);return{type:n.type,data:n.data,id:n.id||((t=n.data)===null||t===void 0?void 0:t.id),timestamp:n.timestamp||new Date().toISOString()}}catch(n){return console.warn("[Base44 SDK] Failed to parse realtime message:",n),null}}function $A(e,t,n,s){const o=`/apps/${t}/entities/${n}`;return{async list(l,c,d,f){const p={};return l&&(p.sort=l),c&&(p.limit=c),d&&(p.skip=d),f&&(p.fields=Array.isArray(f)?f.join(","):f),e.get(o,{params:p})},async filter(l,c,d,f,p){const g={q:JSON.stringify(l)};return c&&(g.sort=c),d&&(g.limit=d),f&&(g.skip=f),p&&(g.fields=Array.isArray(p)?p.join(","):p),e.get(o,{params:g})},async get(l){return e.get(`${o}/${l}`)},async create(l){return e.post(o,l)},async update(l,c){return e.put(`${o}/${l}`,c)},async delete(l){return e.delete(`${o}/${l}`)},async deleteMany(l){return e.delete(o,{data:l})},async bulkCreate(l){return e.post(`${o}/bulk`,l)},async updateMany(l,c){return e.patch(`${o}/update-many`,{query:l,data:c})},async bulkUpdate(l){return e.put(`${o}/bulk`,l)},async importEntities(l){const c=new FormData;return c.append("file",l,l.name),e.post(`${o}/import`,c,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(l){const c=`entities:${t}:${n}`;return s().subscribeToRoom(c,{update_model:p=>{var g;const y=zA(p.data);if(y){y.type!=="delete"&&(!((g=y.data)===null||g===void 0)&&g._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${n}#${y.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${n}.get("${y.id}")\` to fetch the full record.`);try{l(y)}catch(x){console.error("[Base44 SDK] Subscription callback error:",x)}}}})}}}function HA(e,t){return{async call(n,s,o){if(!(n!=null&&n.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(s!=null&&s.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:l,queryParams:c,...d}=o??{},f={...d,...l&&{path_params:l},...c&&{query_params:c}};return await e.post(`/apps/${t}/integrations/custom/${n}/${s}`,f)}}}function gv(e,t){const n=HA(e,t);return new Proxy({},{get(s,o){if(!(typeof o!="string"||o==="then"||o.startsWith("_")))return o==="custom"?n:new Proxy({},{get(l,c){if(!(typeof c!="string"||c==="then"||c.startsWith("_")))return async d=>{if(typeof d=="string")throw new Error(`Integration ${c} must receive an object with named parameters, received: ${d}`);let f,p;return d instanceof FormData||d&&Object.values(d).some(g=>g instanceof File)?(f=new FormData,Object.keys(d).forEach(g=>{d[g]instanceof File?f.append(g,d[g],d[g].name):typeof d[g]=="object"&&d[g]!==null?f.append(g,JSON.stringify(d[g])):f.append(g,d[g])}),p="multipart/form-data"):(f=d,p="application/json"),o==="Core"?e.post(`/apps/${t}/integration-endpoints/Core/${c}`,f||d,{headers:{"Content-Type":p}}):e.post(`/apps/${t}/integration-endpoints/installable/${o}/integration-endpoints/${c}`,f||d,{headers:{"Content-Type":p}})}}})}})}function WA(){return typeof window>"u"?!1:window!==window.parent}function qA(e,t,n){const l=Math.round(window.screenX+(window.outerWidth-500)/2),c=Math.round(window.screenY+(window.outerHeight-600)/2),d=window.open(e,"base44_auth",`width=500,height=600,left=${l},top=${c},resizable=yes,scrollbars=yes`);if(!d)return;const f=()=>{window.removeEventListener("message",p),clearInterval(g),d.closed||d.close()},p=y=>{var x;if(y.origin!==n||y.source!==d||!(!((x=y.data)===null||x===void 0)&&x.access_token))return;f();const E=new URL(t),{access_token:P,is_new_user:C}=y.data;E.searchParams.set("access_token",P),C!=null&&E.searchParams.set("is_new_user",String(C)),window.location.href=E.toString()},g=setInterval(()=>{d.closed&&f()},500);window.addEventListener("message",p)}function QA(e,t,n,s){return{async me(){return e.get(`/apps/${n}/entities/User/me`)},async updateMe(o){return e.put(`/apps/${n}/entities/User/me`,o)},redirectToLogin(o){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const l=o?new URL(o,window.location.origin).toString():window.location.href,c=`${s.appBaseUrl}/login?from_url=${encodeURIComponent(l)}`;window.location.href=c},loginWithProvider(o,l="/"){const c=new URL(l,window.location.origin).toString(),d=`app_id=${n}&from_url=${encodeURIComponent(c)}`;let f;o==="sso"?f=`/apps/${n}/auth/sso/login`:f=`/apps/auth${o==="google"?"":`/${o}`}/login`;const p=`${s.appBaseUrl}/api${f}?${d}`;if(WA()){const g=`${p}&popup_origin=${encodeURIComponent(window.location.origin)}`;return qA(g,c,window.location.origin)}window.location.href=p},logout(o){if(delete e.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(d){console.error("Failed to remove token from localStorage:",d)}const l=o||window.location.href,c=`${s.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(l)}`;window.location.href=c}},setToken(o,l=!0){if(o&&(e.defaults.headers.common.Authorization=`Bearer ${o}`,t.defaults.headers.common.Authorization=`Bearer ${o}`,l&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",o),window.localStorage.setItem("token",o)}catch(c){console.error("Failed to save token to localStorage:",c)}},async loginViaEmailPassword(o,l,c){var d;try{const f=await e.post(`/apps/${n}/auth/login`,{email:o,password:l,...c&&{turnstile_token:c}}),{access_token:p,user:g}=f;return p&&this.setToken(p),{access_token:p,user:g}}catch(f){throw((d=f.response)===null||d===void 0?void 0:d.status)===401&&await this.logout(),f}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(o,l){return e.post(`/apps/${n}/users/invite-user`,{user_email:o,role:l})},register(o){return e.post(`/apps/${n}/auth/register`,o)},verifyOtp({email:o,otpCode:l}){return e.post(`/apps/${n}/auth/verify-otp`,{email:o,otp_code:l})},resendOtp(o){return e.post(`/apps/${n}/auth/resend-otp`,{email:o})},resetPasswordRequest(o){return e.post(`/apps/${n}/auth/reset-password-request`,{email:o})},resetPassword({resetToken:o,newPassword:l}){return e.post(`/apps/${n}/auth/reset-password`,{reset_token:o,new_password:l})},changePassword({userId:o,currentPassword:l,newPassword:c}){return e.post(`/apps/${n}/auth/change-password`,{user_id:o,current_password:l,new_password:c})}}}function KA(e,t){return{async getAccessToken(n){const s=`/apps/${t}/auth/sso/accesstoken/${n}`;return e.get(s)},async getIdToken(n){const s=`/apps/${t}/auth/sso/idtoken/${n}`;return e.get(s)}}}function GA(e,t){return{async getAccessToken(n){if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");return(await e.get(`/apps/${t}/external-auth/tokens/${n}`)).access_token},async getConnection(n){var s;if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");const l=await e.get(`/apps/${t}/external-auth/tokens/${n}`);return{accessToken:l.access_token,connectionConfig:(s=l.connection_config)!==null&&s!==void 0?s:null}},async getWorkspaceConnection(n){var s;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const l=await e.get(`/apps/${t}/external-auth/tokens/connectors/${n}`);return{accessToken:l.access_token,connectionConfig:(s=l.connection_config)!==null&&s!==void 0?s:null}},async getCurrentAppUserAccessToken(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.get(`/apps/${t}/app-user-auth/connectors/${n}/token`)).access_token},async getCurrentAppUserConnection(n){var s;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const l=await e.get(`/apps/${t}/app-user-auth/connectors/${n}/token`);return{accessToken:l.access_token,connectionConfig:(s=l.connection_config)!==null&&s!==void 0?s:null}}}}function YA(e,t){return{async connectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.post(`/apps/${t}/app-user-auth/connectors/${n}/initiate`)).redirect_url},async disconnectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");await e.delete(`/apps/${t}/app-user-auth/connectors/${n}`)}}}function Ts(e={}){const{storageKey:t="base44_access_token",paramName:n="access_token",saveToStorage:s=!0,removeFromUrl:o=!0}=e;let l=null;if(typeof window<"u"&&window.location)try{const c=new URLSearchParams(window.location.search);if(l=c.get(n),l){if(s&&XA(l,{storageKey:t}),o){c.delete(n);const d=`${window.location.pathname}${c.toString()?`?${c.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,d)}return l}}catch(c){console.error("Error retrieving token from URL:",c)}if(typeof window<"u"&&window.localStorage)try{return l=window.localStorage.getItem(t),l}catch(c){console.error("Error retrieving token from local storage:",c)}return null}function XA(e,t){const{storageKey:n="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!e)return!1;try{return window.localStorage.setItem(n,e),window.localStorage.setItem("token",e),!0}catch(s){return console.error("Error saving token to local storage:",s),!1}}function yv(e,t,n){const s=(l,c)=>l?`${String(l).replace(/\/$/,"")}${c}`:c,o=l=>{const c=new Headers;if(n!=null&&n.getAuthHeaders){const d=n.getAuthHeaders();Object.entries(d).forEach(([f,p])=>{p!=null&&c.set(f,String(p))})}return l&&new Headers(l).forEach((d,f)=>{c.set(f,d)}),c};return{async invoke(l,c){if(typeof c=="string")throw new Error(`Function ${l} must receive an object with named parameters, received: ${c}`);let d,f;return c instanceof FormData||c&&Object.values(c).some(p=>p instanceof File)?(d=new FormData,Object.keys(c).forEach(p=>{c[p]instanceof File?d.append(p,c[p],c[p].name):typeof c[p]=="object"&&c[p]!==null?d.append(p,JSON.stringify(c[p])):d.append(p,c[p])}),f="multipart/form-data"):(d=c,f="application/json"),e.post(`/apps/${t}/functions/${l}`,d||c,{headers:{"Content-Type":f}})},async fetch(l,c={}){const f=`/functions${l.startsWith("/")?l:`/${l}`}`,p=o(c.headers),g={...c,headers:p};return await fetch(s(n==null?void 0:n.baseURL,f),g)}}}function vv({axios:e,getSocket:t,appId:n,serverUrl:s,token:o}){const l=`/apps/${n}/agents`,c={},d=()=>e.get(`${l}/conversations`),f=C=>e.get(`${l}/conversations/${C}`);return{getConversations:d,getConversation:f,listConversations:C=>e.get(`${l}/conversations`,{params:C}),createConversation:C=>e.post(`${l}/conversations`,C),addMessage:async(C,b)=>e.post(`${l}/conversations/v2/${C.id}/messages`,b),subscribeToConversation:(C,b)=>{const S=`/agent-conversations/${C}`,R=t(),k=f(C).then(A=>(c[C]=A,A));return R.subscribeToRoom(S,{connect:()=>{},update_model:async({data:A})=>{const M=JSON.parse(A);if(M._message){await k;const U=M._message,W=c[C];if(W){const V=W.messages||[],Y=V.findIndex(ve=>ve.id===U.id),ne=Y!==-1?V.map((ve,_e)=>_e===Y?U:ve):[...V,U];c[C]={...W,messages:ne},b==null||b(c[C])}}}})},getWhatsAppConnectURL:C=>{const b=`${s}/api/apps/${n}/agents/${encodeURIComponent(C)}/whatsapp`,S=o??Ts();return S?`${b}?token=${S}`:b},getTelegramConnectURL:C=>{const b=`${s}/api/apps/${n}/agents/${encodeURIComponent(C)}/telegram`,S=o??Ts();return S?`${b}?token=${S}`:b}}}function xv({serverUrl:e,token:t,appId:n}){return{connection:()=>{var o;return{baseURL:`${e}/api/apps/${n}/ai/openai/v1`,token:(o=t??Ts())!==null&&o!==void 0?o:""}}}}function wv(e,t){const n=`/app-logs/${t}`;return{async logUserInApp(s){await e.post(`${n}/log-user-in-app/${s}`)},async fetchLogs(s={}){return await e.get(n,{params:s})},async getStats(s={}){return await e.get(`${n}/stats`,{params:s})}}}function ZA(e,t){return{async inviteUser(n,s){if(s!=="user"&&s!=="admin")throw new Error(`Invalid role: "${s}". Role must be either "user" or "admin".`);return await e.post(`/apps/${t}/runtime/users/invite-user`,{user_email:n,role:s})}}}const Vn=Object.create(null);Vn.open="0";Vn.close="1";Vn.ping="2";Vn.pong="3";Vn.message="4";Vn.upgrade="5";Vn.noop="6";const Hl=Object.create(null);Object.keys(Vn).forEach(e=>{Hl[Vn[e]]=e});const Rf={type:"error",data:"parser error"},a1=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",l1=typeof ArrayBuffer=="function",c1=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Th=({type:e,data:t},n,s)=>a1&&t instanceof Blob?n?s(t):bv(t,s):l1&&(t instanceof ArrayBuffer||c1(t))?n?s(t):bv(new Blob([t]),s):s(Vn[e]+(t||"")),bv=(e,t)=>{const n=new FileReader;return n.onload=function(){const s=n.result.split(",")[1];t("b"+(s||""))},n.readAsDataURL(e)};function Sv(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Md;function JA(e,t){if(a1&&e.data instanceof Blob)return e.data.arrayBuffer().then(Sv).then(t);if(l1&&(e.data instanceof ArrayBuffer||c1(e.data)))return t(Sv(e.data));Th(e,!1,n=>{Md||(Md=new TextEncoder),t(Md.encode(n))})}const Ev="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",No=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,s,o=0,l,c,d,f;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const p=new ArrayBuffer(t),g=new Uint8Array(p);for(s=0;s>4,g[o++]=(c&15)<<4|d>>2,g[o++]=(d&3)<<6|f&63;return p},tN=typeof ArrayBuffer=="function",_h=(e,t)=>{if(typeof e!="string")return{type:"message",data:u1(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:nN(e.substring(1),t)}:Hl[n]?e.length>1?{type:Hl[n],data:e.substring(1)}:{type:Hl[n]}:Rf},nN=(e,t)=>{if(tN){const n=eN(e);return u1(n,t)}else return{base64:!0,data:e}},u1=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},d1="",rN=(e,t)=>{const n=e.length,s=new Array(n);let o=0;e.forEach((l,c)=>{Th(l,!1,d=>{s[c]=d,++o===n&&t(s.join(d1))})})},sN=(e,t)=>{const n=e.split(d1),s=[];for(let o=0;o{const s=n.length;let o;if(s<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,s);else if(s<65536){o=new Uint8Array(3);const l=new DataView(o.buffer);l.setUint8(0,126),l.setUint16(1,s)}else{o=new Uint8Array(9);const l=new DataView(o.buffer);l.setUint8(0,127),l.setBigUint64(1,BigInt(s))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let Id;function Nl(e){return e.reduce((t,n)=>t+n.length,0)}function Ol(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let s=0;for(let o=0;oMath.pow(2,21)-1){d.enqueue(Rf);break}o=g*Math.pow(2,32)+p.getUint32(4),s=3}else{if(Nl(n)e){d.enqueue(Rf);break}}}})}const f1=4;function tt(e){if(e)return aN(e)}function aN(e){for(var t in tt.prototype)e[t]=tt.prototype[t];return e}tt.prototype.on=tt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};tt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};tt.prototype.off=tt.prototype.removeListener=tt.prototype.removeAllListeners=tt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var s,o=0;oPromise.resolve().then(t):(t,n)=>n(t,0),un=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),lN="arraybuffer";function h1(e,...t){return t.reduce((n,s)=>(e.hasOwnProperty(s)&&(n[s]=e[s]),n),{})}const cN=un.setTimeout,uN=un.clearTimeout;function wc(e,t){t.useNativeTimers?(e.setTimeoutFn=cN.bind(un),e.clearTimeoutFn=uN.bind(un)):(e.setTimeoutFn=un.setTimeout.bind(un),e.clearTimeoutFn=un.clearTimeout.bind(un))}const dN=1.33;function fN(e){return typeof e=="string"?hN(e):Math.ceil((e.byteLength||e.size)*dN)}function hN(e){let t=0,n=0;for(let s=0,o=e.length;s=57344?n+=3:(s++,n+=4);return n}function p1(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function pN(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function mN(e){let t={},n=e.split("&");for(let s=0,o=n.length;s{this.readyState="paused",t()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||n()})),this.writable||(s++,this.once("drain",function(){--s||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};sN(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,rN(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=p1()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let m1=!1;try{m1=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const vN=m1;function xN(){}class wN extends yN{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let s=location.port;s||(s=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||s!==t.port}}doWrite(t,n){const s=this.request({method:"POST",data:t});s.on("success",n),s.on("error",(o,l)=>{this.onError("xhr post error",o,l)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,s)=>{this.onError("xhr poll error",n,s)}),this.pollXhr=t}}class Mn extends tt{constructor(t,n,s){super(),this.createRequest=t,wc(this,s),this._opts=s,this._method=s.method||"GET",this._uri=n,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var t;const n=h1(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(n);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&s.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var o;s.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=Mn.requestsCount++,Mn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=xN,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Mn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Mn.requestsCount=0;Mn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Cv);else if(typeof addEventListener=="function"){const e="onpagehide"in un?"pagehide":"unload";addEventListener(e,Cv,!1)}}function Cv(){for(let e in Mn.requests)Mn.requests.hasOwnProperty(e)&&Mn.requests[e].abort()}const bN=(function(){const e=g1({xdomain:!1});return e&&e.responseType!==null})();class SN extends wN{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=bN&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Mn(g1,this.uri(),t)}}function g1(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||vN))return new XMLHttpRequest}catch{}if(!t)try{return new un[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const y1=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class EN extends kh{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,s=y1?{}:h1(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,s)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{try{this.doWrite(s,l)}catch{}o&&xc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=p1()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Fd=un.WebSocket||un.MozWebSocket;class CN extends EN{createSocket(t,n,s){return y1?new Fd(t,n,s):n?new Fd(t,n):new Fd(t)}doWrite(t,n){this.ws.send(n)}}class TN extends kh{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=oN(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=t.readable.pipeThrough(n).getReader(),o=iN();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const l=()=>{s.read().then(({done:d,value:f})=>{d||(this.onPacket(f),l())}).catch(d=>{})};l();const c={type:"open"};this.query.sid&&(c.data=`{"sid":"${this.query.sid}"}`),this._writer.write(c).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n{o&&xc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const _N={websocket:CN,webtransport:TN,polling:SN},kN=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,PN=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Af(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),s=e.indexOf("]");n!=-1&&s!=-1&&(e=e.substring(0,n)+e.substring(n,s).replace(/:/g,";")+e.substring(s,e.length));let o=kN.exec(e||""),l={},c=14;for(;c--;)l[PN[c]]=o[c]||"";return n!=-1&&s!=-1&&(l.source=t,l.host=l.host.substring(1,l.host.length-1).replace(/;/g,":"),l.authority=l.authority.replace("[","").replace("]","").replace(/;/g,":"),l.ipv6uri=!0),l.pathNames=RN(l,l.path),l.queryKey=AN(l,l.query),l}function RN(e,t){const n=/\/{2,9}/g,s=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&s.splice(0,1),t.slice(-1)=="/"&&s.splice(s.length-1,1),s}function AN(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,o,l){o&&(n[o]=l)}),n}const Nf=typeof addEventListener=="function"&&typeof removeEventListener=="function",Wl=[];Nf&&addEventListener("offline",()=>{Wl.forEach(e=>e())},!1);class zr extends tt{constructor(t,n){if(super(),this.binaryType=lN,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const s=Af(t);n.hostname=s.host,n.secure=s.protocol==="https"||s.protocol==="wss",n.port=s.port,s.query&&(n.query=s.query)}else n.host&&(n.hostname=Af(n.host).host);wc(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(s=>{const o=s.prototype.name;this.transports.push(o),this._transportsByName[o]=s}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=mN(this.opts.query)),Nf&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Wl.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=f1,n.transport=t,this.id&&(n.sid=this.id);const s=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&zr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",zr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let s=0;s0&&n>this._maxPayload)return this.writeBuffer.slice(0,s);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,xc(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,s){return this._sendPacket("message",t,n,s),this}send(t,n,s){return this._sendPacket("message",t,n,s),this}_sendPacket(t,n,s,o){if(typeof n=="function"&&(o=n,n=void 0),typeof s=="function"&&(o=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const l={type:t,data:n,options:s};this.emitReserved("packetCreate",l),this.writeBuffer.push(l),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},s=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():t()}):this.upgrading?s():t()),this}_onError(t){if(zr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Nf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=Wl.indexOf(this._offlineEventListener);s!==-1&&Wl.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}zr.protocol=f1;class NN extends zr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{s||(n.send([{type:"ping",data:"probe"}]),n.once("packet",y=>{if(!s)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;zr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(g(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const x=new Error("probe error");x.transport=n.name,this.emitReserved("upgradeError",x)}}))};function l(){s||(s=!0,g(),n.close(),n=null)}const c=y=>{const x=new Error("probe error: "+y);x.transport=n.name,l(),this.emitReserved("upgradeError",x)};function d(){c("transport closed")}function f(){c("socket closed")}function p(y){n&&y.name!==n.name&&l()}const g=()=>{n.removeListener("open",o),n.removeListener("error",c),n.removeListener("close",d),this.off("close",f),this.off("upgrading",p)};n.once("open",o),n.once("error",c),n.once("close",d),this.once("close",f),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{s||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let s=0;s_N[l]).filter(l=>!!l)),super(s?o:t,o)}};function jN(e,t="",n){let s=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),s=Af(e)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const l=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+l+":"+s.port+t,s.href=s.protocol+"://"+l+(n&&n.port===s.port?"":":"+s.port),s}const LN=typeof ArrayBuffer=="function",DN=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,v1=Object.prototype.toString,MN=typeof Blob=="function"||typeof Blob<"u"&&v1.call(Blob)==="[object BlobConstructor]",IN=typeof File=="function"||typeof File<"u"&&v1.call(File)==="[object FileConstructor]";function Ph(e){return LN&&(e instanceof ArrayBuffer||DN(e))||MN&&e instanceof Blob||IN&&e instanceof File}function ql(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,s=e.length;n=0&&e.numthis.opts.maxAttachments)throw new Error("too many attachments");s.attachments=d}if(t.charAt(n+1)==="/"){const l=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););s.nsp=t.substring(l,n)}else s.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const l=n+1;for(;++n;){const c=t.charAt(n);if(c==null||Number(c)!=c){--n;break}if(n===t.length)break}s.id=Number(t.substring(l,n+1))}if(t.charAt(++n)){const l=this.tryParse(t.substr(n));if(Rh.isPayloadValid(s.type,l))s.data=l;else throw new Error("invalid payload")}return s}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case Oe.CONNECT:return Tv(n);case Oe.DISCONNECT:return n===void 0;case Oe.CONNECT_ERROR:return typeof n=="string"||Tv(n);case Oe.EVENT:case Oe.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&BN.indexOf(n[0])===-1);case Oe.ACK:case Oe.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class zN{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=VN(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const $N=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function Tv(e){return Object.prototype.toString.call(e)==="[object Object]"}const HN=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Rh,Encoder:UN,get PacketType(){return Oe}},Symbol.toStringTag,{value:"Module"}));function Cn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const WN=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class x1 extends tt{constructor(t,n,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Cn(t,"open",this.onopen.bind(this)),Cn(t,"packet",this.onpacket.bind(this)),Cn(t,"error",this.onerror.bind(this)),Cn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var s,o,l;if(WN.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const c={type:Oe.EVENT,data:n};if(c.options={},c.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const g=this.ids++,y=n.pop();this._registerAckCallback(g,y),c.id=g}const d=(o=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||o===void 0?void 0:o.writable,f=this.connected&&!(!((l=this.io.engine)===null||l===void 0)&&l._hasPingExpired());return this.flags.volatile&&!d||(f?(this.notifyOutgoingListeners(c),this.packet(c)):this.sendBuffer.push(c)),this.flags={},this}_registerAckCallback(t,n){var s;const o=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const l=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let d=0;d{this.io.clearTimeoutFn(l),n.apply(this,d)};c.withError=!0,this.acks[t]=c}emitWithAck(t,...n){return new Promise((s,o)=>{const l=(c,d)=>c?o(c):s(d);l.withError=!0,n.push(l),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...l)=>(this._queue[0],o!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...l)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Oe.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(s=>String(s.id)===t)){const s=this.acks[t];delete this.acks[t],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Oe.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Oe.EVENT:case Oe.BINARY_EVENT:this.onevent(t);break;case Oe.ACK:case Oe.BINARY_ACK:this.onack(t);break;case Oe.DISCONNECT:this.ondisconnect();break;case Oe.CONNECT_ERROR:this.destroy();const s=new Error(t.data.message);s.data=t.data.data,this.emitReserved("connect_error",s);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const s of n)s.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let s=!1;return function(...o){s||(s=!0,n.packet({type:Oe.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Oe.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let s=0;s0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ni.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};Ni.prototype.reset=function(){this.attempts=0};Ni.prototype.setMin=function(e){this.ms=e};Ni.prototype.setMax=function(e){this.max=e};Ni.prototype.setJitter=function(e){this.jitter=e};class Lf extends tt{constructor(t,n){var s;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,wc(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((s=n.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Ni({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||HN;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new ON(this.uri,this.opts);const n=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const o=Cn(n,"open",function(){s.onopen(),t&&t()}),l=d=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",d),t?t(d):this.maybeReconnectOnOpen()},c=Cn(n,"error",l);if(this._timeout!==!1){const d=this._timeout,f=this.setTimeoutFn(()=>{o(),l(new Error("timeout")),n.close()},d);this.opts.autoUnref&&f.unref(),this.subs.push(()=>{this.clearTimeoutFn(f)})}return this.subs.push(o),this.subs.push(c),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Cn(t,"ping",this.onping.bind(this)),Cn(t,"data",this.ondata.bind(this)),Cn(t,"error",this.onerror.bind(this)),Cn(t,"close",this.onclose.bind(this)),Cn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){xc(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let s=this.nsps[t];return s?this._autoConnect&&!s.active&&s.connect():(s=new x1(this,t,n),this.nsps[t]=s),s}_destroy(t){const n=Object.keys(this.nsps);for(const s of n)if(this.nsps[s].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let s=0;st()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const _o={};function Ql(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=jN(e,t.path||"/socket.io"),s=n.source,o=n.id,l=n.path,c=_o[o]&&l in _o[o].nsps,d=t.forceNew||t["force new connection"]||t.multiplex===!1||c;let f;return d?f=new Lf(s,t):(_o[o]||(_o[o]=new Lf(s,t)),f=_o[o]),n.query&&!t.query&&(t.query=n.queryKey),f.socket(n.path,t)}Object.assign(Ql,{Manager:Lf,Socket:x1,io:Ql,connect:Ql});const qN=250;function _v(e,t){var n;const s=(n=e.token)!==null&&n!==void 0?n:Ts(),o={app_id:e.appId,token:s};s||(o.anonymous_id=Ch());const l=Ql(e.serverUrl,{path:e.mountPath,transports:e.transports,query:o});return l.on("connect",async()=>{var c;return console.log("connect",l.id),(c=t.connect)===null||c===void 0?void 0:c.call(t)}),l.on("update_model",async c=>{var d;return(d=t.update_model)===null||d===void 0?void 0:d.call(t,c)}),l.on("error",async c=>{var d;return(d=t.error)===null||d===void 0?void 0:d.call(t,c)}),l.on("connect_error",async c=>{var d;return console.error("connect_error",c),(d=t.error)===null||d===void 0?void 0:d.call(t,c)}),l}function QN({config:e}){let t={...e};const n={},s={},o={connect:async()=>{const S=[];Object.keys(n).forEach(R=>{const k=x(R);k.length!==0&&(p(R),k.forEach(({connect:A})=>{const M=async()=>A==null?void 0:A();S.push(M())}))}),await Promise.all(S)},update_model:async S=>{const k=x(S.room).map(A=>{var M;return(M=A.update_model)===null||M===void 0?void 0:M.call(A,S)});await Promise.all(k)},error:async S=>{console.error("error",S);const R=Object.values(n).flat().map(k=>{var A;return(A=k.error)===null||A===void 0?void 0:A.call(k,S)});await Promise.all(R)}};let l=_v(e,o);function c(){d()}function d(){P(),l&&l.disconnect()}function f(S){c(),t={...t,...S},l=_v(t,o)}function p(S){l.emit("join",S)}function g(S){l.emit("leave",S)}async function y(S,R){var k;const A=JSON.stringify(R);return(k=o.update_model)===null||k===void 0?void 0:k.call(o,{room:S,data:A})}function x(S){var R;return(R=n[S])!==null&&R!==void 0?R:[]}function E(S){const R=s[S];R&&(clearTimeout(R),delete s[S])}function P(){Object.keys(s).forEach(S=>{var R,k;clearTimeout(s[S]),delete s[S],((k=(R=n[S])===null||R===void 0?void 0:R.length)!==null&&k!==void 0?k:0)===0&&delete n[S]})}function C(S){E(S),s[S]=setTimeout(()=>{var R,k;delete s[S],!(((k=(R=n[S])===null||R===void 0?void 0:R.length)!==null&&k!==void 0?k:0)>0)&&(g(S),delete n[S])},qN)}return{socket:l,subscribeToRoom:(S,R)=>{n[S]?E(S):(p(S),n[S]=[]),n[S].push(R);let k=!1;return()=>{var A,M;k||(k=!0,n[S]=(M=(A=n[S])===null||A===void 0?void 0:A.filter(U=>U!==R))!==null&&M!==void 0?M:[],n[S].length===0&&C(S))}},updateConfig:f,updateModel:y,disconnect:d}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` PartySocket requires a global 'EventTarget' class to be available! You can polyfill this global by adding this to your code before any partysocket imports: \`\`\` import 'partysocket/event-target-polyfill'; \`\`\` Please file an issue at https://github.com/partykit/partykit if you're still having trouble. `);var w1=class extends Event{constructor(t,n){super("error",n);De(this,"message");De(this,"error");this.message=t.message,this.error=t}},b1=class extends Event{constructor(t=1e3,n="",s){super("close",s);De(this,"code");De(this,"reason");De(this,"wasClean",!0);this.code=t,this.reason=n}},Vd={Event,ErrorEvent:w1,CloseEvent:b1};function KN(e,t){if(!e)throw new Error(t)}function GN(e){return new e.constructor(e.type,e)}function YN(e){return"data"in e?new MessageEvent(e.type,e):"code"in e||"reason"in e?new b1(e.code||1999,e.reason||"unknown reason",e):"error"in e?new w1(e.error,e):new Event(e.type,e)}var hx,XN=typeof process<"u"&&typeof((hx=process.versions)==null?void 0:hx.node)<"u"&&typeof document>"u",jl=XN?YN:GN,as={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},kv=!1,ZN=class cs extends EventTarget{constructor(n,s,o={}){super();De(this,"_ws");De(this,"_retryCount",-1);De(this,"_uptimeTimeout");De(this,"_connectTimeout");De(this,"_shouldReconnect",!0);De(this,"_connectLock",!1);De(this,"_binaryType","blob");De(this,"_closeCalled",!1);De(this,"_messageQueue",[]);De(this,"_url");De(this,"_protocols");De(this,"_options");De(this,"onclose",null);De(this,"onerror",null);De(this,"onmessage",null);De(this,"onopen",null);De(this,"_handleOpen",n=>{this._debug("open event");const{minUptime:s=as.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),s),KN(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(o=>{var l;return(l=this._ws)==null?void 0:l.send(o)}),this._messageQueue=[],this.onopen&&this.onopen(n),this.dispatchEvent(jl(n))});De(this,"_handleMessage",n=>{this._debug("message event"),this.onmessage&&this.onmessage(n),this.dispatchEvent(jl(n))});De(this,"_handleError",n=>{this._debug("error event",n.message),this._disconnect(void 0,n.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(n),this._debug("exec error listeners"),this.dispatchEvent(jl(n)),this._connect()});De(this,"_handleClose",n=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(n),this.dispatchEvent(jl(n))});this._url=n,this._protocols=s,this._options=o,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return cs.CONNECTING}get OPEN(){return cs.OPEN}get CLOSING(){return cs.CLOSING}get CLOSED(){return cs.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(n){this._binaryType=n,this._ws&&(this._ws.binaryType=n)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((s,o)=>(typeof o=="string"?s+=o.length:o instanceof Blob?s+=o.size:s+=o.byteLength,s),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?cs.CLOSED:cs.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(n=1e3,s){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(n,s)}reconnect(n,s){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(n,s),this._connect())}send(n){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",n),this._ws.send(n);else{const{maxEnqueuedMessages:s=as.maxEnqueuedMessages}=this._options;this._messageQueue.length",...n])}_getNextDelay(){const{reconnectionDelayGrowFactor:n=as.reconnectionDelayGrowFactor,minReconnectionDelay:s=as.minReconnectionDelay,maxReconnectionDelay:o=as.maxReconnectionDelay}=this._options;let l=0;return this._retryCount>0&&(l=s*Math.pow(n,this._retryCount-1),l>o&&(l=o)),this._debug("next delay",l),l}_wait(){return new Promise(n=>{setTimeout(n,this._getNextDelay())})}_getNextProtocols(n){if(!n)return Promise.resolve(null);if(typeof n=="string"||Array.isArray(n))return Promise.resolve(n);if(typeof n=="function"){const s=n();if(!s)return Promise.resolve(null);if(typeof s=="string"||Array.isArray(s))return Promise.resolve(s);if(s.then)return s}throw Error("Invalid protocols")}_getNextUrl(n){if(typeof n=="string")return Promise.resolve(n);if(typeof n=="function"){const s=n();if(typeof s=="string")return Promise.resolve(s);if(s.then)return s}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:n=as.maxRetries,connectionTimeout:s=as.connectionTimeout}=this._options;if(this._retryCount>=n){this._debug("max retries reached",this._retryCount,">=",n);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([o,l])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!kv&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. For example, if you're using node.js, run \`npm install ws\`, and then in your code: import PartySocket from 'partysocket'; import WS from 'ws'; const partysocket = new PartySocket({ host: "127.0.0.1:1999", room: "test-room", WebSocket: WS }); `),kv=!0);const c=this._options.WebSocket||WebSocket;this._debug("connect",{url:o,protocols:l}),this._ws=l?new c(o,l):new c(o),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),s)}).catch(o=>{this._connectLock=!1,this._handleError(new Vd.ErrorEvent(Error(o.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new Vd.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(n=1e3,s){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(n,s),this._handleClose(new Vd.CloseEvent(n,s,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! * Reconnecting WebSocket * by Pedro Ladaria * https://github.com/pladaria/reconnecting-websocket * License MIT */var JN=e=>e[1]!==null&&e[1]!==void 0;function e2(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let e=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){let s=Math.random()*16;return e>0?(s=(e+s)%16|0,e=Math.floor(e/16)):(s=(t+s)%16|0,t=Math.floor(t/16)),(n==="x"?s:s&3|8).toString(16)})}function S1(e,t,n={}){const{host:s,path:o,protocol:l,room:c,party:d,query:f}=e;let p=s.replace(/^(http|https|ws|wss):\/\//,"");if(p.endsWith("/")&&(p=p.slice(0,-1)),o&&o.startsWith("/"))throw new Error("path must not start with a slash");const g=d??"main",y=o?`/${o}`:"",x=l||(p.startsWith("localhost:")||p.startsWith("127.0.0.1:")||p.startsWith("192.168.")||p.startsWith("10.")||p.startsWith("172.")&&p.split(".")[1]>="16"&&p.split(".")[1]<="31"||p.startsWith("[::ffff:7f00:1]:")?t:t+"s"),E=`${x}://${p}/${d?`parties/${d}`:"party"}/${c}${y}`,P=(b={})=>`${E}?${new URLSearchParams([...Object.entries(n),...Object.entries(b).filter(JN)])}`,C=typeof f=="function"?async()=>P(await f()):P(f);return{host:p,path:y,room:c,name:g,protocol:x,partyUrl:E,urlProvider:C}}var t2=class extends ZN{constructor(t){const n=Pv(t);super(n.urlProvider,n.protocols,n.socketOptions);De(this,"_pk");De(this,"_pkurl");De(this,"name");De(this,"room");De(this,"host");De(this,"path");this.partySocketOptions=t,this.setWSProperties(n)}updateProperties(t){const n=Pv({...t,host:t.host??this.host,room:t.room??this.room,path:t.path??this.path});this._url=n.urlProvider,this._protocols=n.protocols,this._options=n.socketOptions,this.setWSProperties(n)}setWSProperties(t){const{_pk:n,_pkurl:s,name:o,room:l,host:c,path:d}=t;this._pk=n,this._pkurl=s,this.name=o,this.room=l,this.host=c,this.path=d}reconnect(t,n){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(t,n)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(t,n){const s=S1(t,"http"),o=typeof s.urlProvider=="string"?s.urlProvider:await s.urlProvider();return(t.fetch??fetch)(o,n)}};function Pv(e){const{id:t,host:n,path:s,party:o,room:l,protocol:c,query:d,protocols:f,...p}=e,g=t||e2(),y=S1(e,"ws",{_pk:g});return{_pk:g,_pkurl:y.partyUrl,name:y.name,room:y.room,host:y.host,path:y.path,protocols:f,socketOptions:p,urlProvider:y.urlProvider}}const n2=1e3,r2=3e3;class s2{constructor(t,n,s,o,l){var c;this.onClose=l,this.listeners=new Set,this.heartbeat=null,this.id=(c=o==null?void 0:o.id)!==null&&c!==void 0?c:crypto.randomUUID();const d=new t2({host:s.host,party:t,room:n,id:this.id,query:()=>{const g=s.getAuthToken();return{app_id:s.appId,handler:t,...g?{token:g}:{},...s.functionsVersion?{fv:s.functionsVersion}:{}}}});this.ws=d;let f=Date.now();const p=()=>{f=Date.now()};d.addEventListener("open",p),d.addEventListener("message",g=>{p();let y;try{y=JSON.parse(g.data)}catch{return}if((y&&typeof y=="object"?y.type:void 0)!=="__pong")for(const E of this.listeners)E(y)}),this.heartbeat=setInterval(()=>{if(Date.now()-f>r2){p(),d.reconnect();return}try{d.send(JSON.stringify({type:"__ping"}))}catch{}},n2)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.ws.send(JSON.stringify(t))}close(){this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose()}}function i2(e,t,n,s){let o=null;return{connect(l){if(o)return o;const c=new s2(e,t,n,l,()=>{s.delete(c),o===c&&(o=null)});return o=c,s.add(c),c}}}function o2(e,t){return e&&!e.startsWith("/")?e:t??e}function a2(e){const t=new Set;return{module:new Proxy({},{get(s,o){if(!(typeof o!="string"||o==="then"))return l=>i2(o,l,e,t)}}),closeAll:()=>{for(const s of[...t])s.close()}}}function l2(e){var t,n,s;const{serverUrl:o="https://base44.app",appId:l,token:c,serviceToken:d,requiresAuth:f=!1,appBaseUrl:p,options:g,functionsVersion:y,headers:x}=e,E=typeof p=="string"?p:"",P={serverUrl:o,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:l,token:c};let C=null;const b=()=>(C||(C=QN({config:P})),C),S={...x,"X-App-Id":String(l)},R=y?{...S,"Base44-Functions-Version":y}:S,k=Ao({baseURL:`${o}/api`,headers:S,token:c,onError:g==null?void 0:g.onError}),A=Ao({baseURL:`${o}/api`,headers:R,token:c,interceptResponses:!1,onError:g==null?void 0:g.onError}),M={...S,...c?{"on-behalf-of":`Bearer ${c}`}:{}},U=Ao({baseURL:`${o}/api`,headers:M,token:d,onError:g==null?void 0:g.onError}),W=Ao({baseURL:`${o}/api`,headers:R,token:d,interceptResponses:!1}),V=QA(k,A,l,{appBaseUrl:E});if(typeof window<"u"){const be=c||Ts();be&&V.setToken(be)}const Y=a2({appId:l,host:o2(o,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:y,getAuthToken:()=>c||Ts()}),ne={entities:mv({axios:k,appId:l,getSocket:b}),integrations:gv(k,l),connectors:YA(k,l),auth:V,functions:yv(A,l,{getAuthHeaders:()=>{const be={},J=c||Ts();return J&&(be.Authorization=`Bearer ${J}`),be},baseURL:(n=A.defaults)===null||n===void 0?void 0:n.baseURL}),agents:vv({axios:k,getSocket:b,appId:l,serverUrl:o,token:c}),aiGateway:xv({serverUrl:o,token:c,appId:l}),appLogs:wv(k,l),users:ZA(k,l),analytics:jA({axiosClient:k,serverUrl:o,appId:l,userAuthModule:V}),actors:Y.module,cleanup:()=>{ne.analytics.cleanup(),Y.closeAll(),C&&C.disconnect()}},ve={entities:mv({axios:U,appId:l,getSocket:b}),integrations:gv(U,l),sso:KA(U,l),connectors:GA(U,l),functions:yv(W,l,{getAuthHeaders:()=>{const be={};return d&&(be.Authorization=`Bearer ${d}`),be},baseURL:(s=W.defaults)===null||s===void 0?void 0:s.baseURL}),agents:vv({axios:U,getSocket:b,appId:l,serverUrl:o,token:c}),aiGateway:xv({serverUrl:o,token:d,appId:l}),appLogs:wv(U,l),cleanup:()=>{C&&C.disconnect()}};return f&&typeof window<"u"&&setTimeout(async()=>{try{await ne.auth.isAuthenticated()||ne.auth.redirectToLogin(window.location.href)}catch(be){console.error("Authentication check failed:",be),ne.auth.redirectToLogin(window.location.href)}},0),{...ne,setToken(be){ne.auth.setToken(be),C&&C.updateConfig({token:be}),P.token=be},getConfig(){return{serverUrl:o,appId:l,requiresAuth:f}},get asServiceRole(){if(!d)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return ve}}}const E1=typeof window>"u",c2=E1?{localStorage:new Map}:window,Fo=c2.localStorage,u2=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),oi=(e,{defaultValue:t=void 0,removeFromUrl:n=!1}={})=>{if(E1)return t;const s=`base44_${u2(e)}`,o=new URLSearchParams(window.location.search),l=o.get(e);if(n){o.delete(e);const d=`${window.location.pathname}${o.toString()?`?${o.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,d)}if(l)return Fo.setItem(s,l),l;if(t)return Fo.setItem(s,t),t;const c=Fo.getItem(s);return c||null},d2=()=>(oi("clear_access_token")==="true"&&(Fo.removeItem("base44_access_token"),Fo.removeItem("token")),{appId:oi("app_id",{defaultValue:"6a8038051f45959adca00b47"}),token:oi("access_token",{removeFromUrl:!0}),fromUrl:oi("from_url",{defaultValue:window.location.href}),functionsVersion:oi("functions_version",{defaultValue:"prod"}),appBaseUrl:oi("app_base_url",{defaultValue:void 0})}),Oo={...d2()},{appId:f2,token:h2,functionsVersion:p2,appBaseUrl:m2}=Oo,jo=l2({appId:f2,token:h2,functionsVersion:p2,serverUrl:"",requiresAuth:!1,appBaseUrl:m2});function g2({}){var o;const t=gh().pathname.substring(1),{data:n,isFetched:s}=Nk({queryKey:["user"],queryFn:async()=>{try{return{user:await jo.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return v.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:v.jsx("div",{className:"max-w-md w-full",children:v.jsxs("div",{className:"text-center space-y-6",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),v.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),v.jsxs("div",{className:"space-y-3",children:[v.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),v.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",v.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),s&&n.isAuthenticated&&((o=n.user)==null?void 0:o.role)==="admin"&&v.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:v.jsxs("div",{className:"flex items-start space-x-3",children:[v.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:v.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),v.jsxs("div",{className:"text-left space-y-1",children:[v.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),v.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),v.jsx("div",{className:"pt-6",children:v.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[v.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const C1=T.createContext(),y2=({children:e})=>{const[t,n]=T.useState(null),[s,o]=T.useState(!1),[l,c]=T.useState(!0),[d,f]=T.useState(!0),[p,g]=T.useState(null),[y,x]=T.useState(!1),[E,P]=T.useState(null);T.useEffect(()=>{C()},[]);const C=async()=>{var k,A;try{f(!0),g(null);const M=Ao({baseURL:"/api/apps/public",headers:{"X-App-Id":Oo.appId},token:Oo.token,interceptResponses:!0});try{const U=await M.get(`/prod/public-settings/by-id/${Oo.appId}`);P(U),Oo.token?await b():(c(!1),o(!1),x(!0)),f(!1)}catch(U){if(console.error("App state check failed:",U),U.status===403&&((A=(k=U.data)==null?void 0:k.extra_data)!=null&&A.reason)){const W=U.data.extra_data.reason;g(W==="auth_required"?{type:"auth_required",message:"Authentication required"}:W==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:W,message:U.message})}else g({type:"unknown",message:U.message||"Failed to load app"});f(!1),c(!1)}}catch(M){console.error("Unexpected error:",M),g({type:"unknown",message:M.message||"An unexpected error occurred"}),f(!1),c(!1)}},b=async()=>{try{c(!0);const k=await jo.auth.me();n(k),o(!0),c(!1),x(!0)}catch(k){console.error("User auth check failed:",k),c(!1),o(!1),x(!0),(k.status===401||k.status===403)&&g({type:"auth_required",message:"Authentication required"})}},S=(k=!0)=>{n(null),o(!1),k?jo.auth.logout(window.location.href):jo.auth.logout()},R=()=>{jo.auth.redirectToLogin(window.location.href)};return v.jsx(C1.Provider,{value:{user:t,isAuthenticated:s,isLoadingAuth:l,isLoadingPublicSettings:d,authError:p,appPublicSettings:E,authChecked:y,logout:S,navigateToLogin:R,checkUserAuth:b,checkAppState:C},children:e})},v2=()=>{const e=T.useContext(C1);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},x2=()=>v.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:v.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:v.jsxs("div",{className:"text-center",children:[v.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:v.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),v.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),v.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),v.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[v.jsx("p",{children:"If you believe this is an error, you can:"}),v.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[v.jsx("li",{children:"Verify you are logged in with the correct account"}),v.jsx("li",{children:"Contact the app administrator for access"}),v.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),w2=e=>{const t=e.slice(1);try{return decodeURIComponent(t)}catch{return t}};function b2(){const{pathname:e,hash:t}=gh(),n=rP();return T.useEffect(()=>{if(n!=="POP"){if(t){const s=w2(t),o=window.setTimeout(()=>{var l;(l=document.getElementById(s))==null||l.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(o)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[e,t,n]),null}const Ah=T.createContext({});function Oi(e){const t=T.useRef(null);return t.current===null&&(t.current=e()),t.current}const bc=T.createContext(null),Sc=T.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class S2 extends T.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function E2({children:e,isPresent:t}){const n=T.useId(),s=T.useRef(null),o=T.useRef({width:0,height:0,top:0,left:0}),{nonce:l}=T.useContext(Sc);return T.useInsertionEffect(()=>{const{width:c,height:d,top:f,left:p}=o.current;if(t||!s.current||!c||!d)return;s.current.dataset.motionPopId=n;const g=document.createElement("style");return l&&(g.nonce=l),document.head.appendChild(g),g.sheet&&g.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${c}px !important; height: ${d}px !important; top: ${f}px !important; left: ${p}px !important; } `),()=>{document.head.removeChild(g)}},[t]),v.jsx(S2,{isPresent:t,childRef:s,sizeRef:o,children:T.cloneElement(e,{ref:s})})}const C2=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:o,presenceAffectsLayout:l,mode:c})=>{const d=Oi(T2),f=T.useId(),p=T.useCallback(y=>{d.set(y,!0);for(const x of d.values())if(!x)return;s&&s()},[d,s]),g=T.useMemo(()=>({id:f,initial:t,isPresent:n,custom:o,onExitComplete:p,register:y=>(d.set(y,!1),()=>d.delete(y))}),l?[Math.random(),p]:[n,p]);return T.useMemo(()=>{d.forEach((y,x)=>d.set(x,!1))},[n]),T.useEffect(()=>{!n&&!d.size&&s&&s()},[n]),c==="popLayout"&&(e=v.jsx(E2,{isPresent:n,children:e})),v.jsx(bc.Provider,{value:g,children:e})};function T2(){return new Map}function T1(e=!0){const t=T.useContext(bc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:o}=t,l=T.useId();T.useEffect(()=>{e&&o(l)},[e]);const c=T.useCallback(()=>e&&s&&s(l),[l,s,e]);return!n&&s?[!1,c]:[!0]}const Ll=e=>e.key||"";function Rv(e){const t=[];return T.Children.forEach(e,n=>{T.isValidElement(n)&&t.push(n)}),t}const Nh=typeof window<"u",Ec=Nh?T.useLayoutEffect:T.useEffect,Av=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:o=!0,mode:l="sync",propagate:c=!1})=>{const[d,f]=T1(c),p=T.useMemo(()=>Rv(e),[e]),g=c&&!d?[]:p.map(Ll),y=T.useRef(!0),x=T.useRef(p),E=Oi(()=>new Map),[P,C]=T.useState(p),[b,S]=T.useState(p);Ec(()=>{y.current=!1,x.current=p;for(let A=0;A{const M=Ll(A),U=c&&!d?!1:p===b||g.includes(M),W=()=>{if(E.has(M))E.set(M,!0);else return;let V=!0;E.forEach(Y=>{Y||(V=!1)}),V&&(k==null||k(),S(x.current),c&&(f==null||f()),s&&s())};return v.jsx(C2,{isPresent:U,initial:!y.current||n?void 0:!1,custom:U?void 0:t,presenceAffectsLayout:o,mode:l,onExitComplete:U?void 0:W,children:A},M)})})},Ot=e=>e;let _2=Ot,_1=Ot;function Oh(e){let t;return()=>(t===void 0&&(t=e()),t)}const Os=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s},rr=e=>e*1e3,sr=e=>e/1e3,k2={useManualTiming:!1};function P2(e){let t=new Set,n=new Set,s=!1,o=!1;const l=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function d(p){l.has(p)&&(f.schedule(p),e()),p(c)}const f={schedule:(p,g=!1,y=!1)=>{const E=y&&s?t:n;return g&&l.add(p),E.has(p)||E.add(p),p},cancel:p=>{n.delete(p),l.delete(p)},process:p=>{if(c=p,s){o=!0;return}s=!0,[t,n]=[n,t],t.forEach(d),t.clear(),s=!1,o&&(o=!1,f.process(p))}};return f}const Dl=["read","resolveKeyframes","update","preRender","render","postRender"],R2=40;function k1(e,t){let n=!1,s=!0;const o={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,c=Dl.reduce((S,R)=>(S[R]=P2(l),S),{}),{read:d,resolveKeyframes:f,update:p,preRender:g,render:y,postRender:x}=c,E=()=>{const S=performance.now();n=!1,o.delta=s?1e3/60:Math.max(Math.min(S-o.timestamp,R2),1),o.timestamp=S,o.isProcessing=!0,d.process(o),f.process(o),p.process(o),g.process(o),y.process(o),x.process(o),o.isProcessing=!1,n&&t&&(s=!1,e(E))},P=()=>{n=!0,s=!0,o.isProcessing||e(E)};return{schedule:Dl.reduce((S,R)=>{const k=c[R];return S[R]=(A,M=!1,U=!1)=>(n||P(),k.schedule(A,M,U)),S},{}),cancel:S=>{for(let R=0;RNv[e].some(n=>!!t[n])};function A2(e){for(const t in e)ki[t]={...ki[t],...e[t]}}const N2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function oc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||N2.has(e)}let R1=e=>!oc(e);function O2(e){e&&(R1=t=>t.startsWith("on")?!oc(t):e(t))}try{O2(require("@emotion/is-prop-valid").default)}catch{}function j2(e,t,n){const s={};for(const o in e)o==="values"&&typeof e.values=="object"||(R1(o)||n===!0&&oc(o)||!t&&!oc(o)||e.draggable&&o.startsWith("onDrag"))&&(s[o]=e[o]);return s}function L2(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...s)=>e(...s);return new Proxy(n,{get:(s,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const Cc=T.createContext({});function Go(e){return typeof e=="string"||Array.isArray(e)}function Tc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const jh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Lh=["initial",...jh];function _c(e){return Tc(e.animate)||Lh.some(t=>Go(e[t]))}function A1(e){return!!(_c(e)||e.variants)}function D2(e,t){if(_c(e)){const{initial:n,animate:s}=e;return{initial:n===!1||Go(n)?n:void 0,animate:Go(s)?s:void 0}}return e.inherit!==!1?t:{}}function M2(e){const{initial:t,animate:n}=D2(e,T.useContext(Cc));return T.useMemo(()=>({initial:t,animate:n}),[Ov(t),Ov(n)])}function Ov(e){return Array.isArray(e)?e.join(" "):e}const I2=Symbol.for("motionComponentSymbol");function ai(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function F2(e,t,n){return T.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):ai(n)&&(n.current=s))},[t])}const Dh=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),V2="framerAppearId",N1="data-"+Dh(V2),{schedule:Mh}=k1(queueMicrotask,!1),O1=T.createContext({});function B2(e,t,n,s,o){var l,c;const{visualElement:d}=T.useContext(Cc),f=T.useContext(P1),p=T.useContext(bc),g=T.useContext(Sc).reducedMotion,y=T.useRef(null);s=s||f.renderer,!y.current&&s&&(y.current=s(e,{visualState:t,parent:d,props:n,presenceContext:p,blockInitialAnimation:p?p.initial===!1:!1,reducedMotionConfig:g}));const x=y.current,E=T.useContext(O1);x&&!x.projection&&o&&(x.type==="html"||x.type==="svg")&&U2(y.current,n,o,E);const P=T.useRef(!1);T.useInsertionEffect(()=>{x&&P.current&&x.update(n,p)});const C=n[N1],b=T.useRef(!!C&&!(!((l=window.MotionHandoffIsComplete)===null||l===void 0)&&l.call(window,C))&&((c=window.MotionHasOptimisedAnimation)===null||c===void 0?void 0:c.call(window,C)));return Ec(()=>{x&&(P.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),Mh.render(x.render),b.current&&x.animationState&&x.animationState.animateChanges())}),T.useEffect(()=>{x&&(!b.current&&x.animationState&&x.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)===null||S===void 0||S.call(window,C)}),b.current=!1))}),x}function U2(e,t,n,s){const{layoutId:o,layout:l,drag:c,dragConstraints:d,layoutScroll:f,layoutRoot:p}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:j1(e.parent)),e.projection.setOptions({layoutId:o,layout:l,alwaysMeasureLayout:!!c||d&&ai(d),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:s,layoutScroll:f,layoutRoot:p})}function j1(e){if(e)return e.options.allowProjection!==!1?e.projection:j1(e.parent)}function z2({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:s,Component:o}){var l,c;e&&A2(e);function d(p,g){let y;const x={...T.useContext(Sc),...p,layoutId:$2(p)},{isStatic:E}=x,P=M2(p),C=s(p,E);if(!E&&Nh){H2();const b=W2(x);y=b.MeasureLayout,P.visualElement=B2(o,C,x,t,b.ProjectionNode)}return v.jsxs(Cc.Provider,{value:P,children:[y&&P.visualElement?v.jsx(y,{visualElement:P.visualElement,...x}):null,n(o,p,F2(C,P.visualElement,g),C,E,P.visualElement)]})}d.displayName=`motion.${typeof o=="string"?o:`create(${(c=(l=o.displayName)!==null&&l!==void 0?l:o.name)!==null&&c!==void 0?c:""})`}`;const f=T.forwardRef(d);return f[I2]=o,f}function $2({layoutId:e}){const t=T.useContext(Ah).id;return t&&e!==void 0?t+"-"+e:e}function H2(e,t){T.useContext(P1).strict}function W2(e){const{drag:t,layout:n}=ki;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const q2=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ih(e){return typeof e!="string"||e.includes("-")?!1:!!(q2.indexOf(e)>-1||/[A-Z]/u.test(e))}function jv(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Fh(e,t,n,s){if(typeof t=="function"){const[o,l]=jv(s);t=t(n!==void 0?n:e.custom,o,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,l]=jv(s);t=t(n!==void 0?n:e.custom,o,l)}return t}const Df=e=>Array.isArray(e),Q2=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),K2=e=>Df(e)?e[e.length-1]||0:e,kt=e=>!!(e&&e.getVelocity);function Kl(e){const t=kt(e)?e.get():e;return Q2(t)?t.toValue():t}function G2({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},s,o,l){const c={latestValues:Y2(s,o,l,e),renderState:t()};return n&&(c.onMount=d=>n({props:s,current:d,...c}),c.onUpdate=d=>n(d)),c}const L1=e=>(t,n)=>{const s=T.useContext(Cc),o=T.useContext(bc),l=()=>G2(e,t,s,o);return n?l():Oi(l)};function Y2(e,t,n,s){const o={},l=s(e,{});for(const x in l)o[x]=Kl(l[x]);let{initial:c,animate:d}=e;const f=_c(e),p=A1(e);t&&p&&!f&&e.inherit!==!1&&(c===void 0&&(c=t.initial),d===void 0&&(d=t.animate));let g=n?n.initial===!1:!1;g=g||c===!1;const y=g?d:c;if(y&&typeof y!="boolean"&&!Tc(y)){const x=Array.isArray(y)?y:[y];for(let E=0;Et=>typeof t=="string"&&t.startsWith(e),M1=D1("--"),X2=D1("var(--"),Vh=e=>X2(e)?Z2.test(e.split("/*")[0].trim()):!1,Z2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,I1=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Bn=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Yo={...Li,transform:e=>Bn(0,1,e)},Ml={...Li,default:1},da=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ar=da("deg"),In=da("%"),ye=da("px"),J2=da("vh"),eO=da("vw"),Lv={...In,parse:e=>In.parse(e)/100,transform:e=>In.transform(e*100)},tO={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,backgroundPositionX:ye,backgroundPositionY:ye},nO={rotate:Ar,rotateX:Ar,rotateY:Ar,rotateZ:Ar,scale:Ml,scaleX:Ml,scaleY:Ml,scaleZ:Ml,skew:Ar,skewX:Ar,skewY:Ar,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:Yo,originX:Lv,originY:Lv,originZ:ye},Dv={...Li,transform:Math.round},Bh={...tO,...nO,zIndex:Dv,size:ye,fillOpacity:Yo,strokeOpacity:Yo,numOctaves:Dv},rO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},sO=ji.length;function iO(e,t,n){let s="",o=!0;for(let l=0;l({style:{},transform:{},transformOrigin:{},vars:{}}),F1=()=>({...$h(),attrs:{}}),Hh=e=>typeof e=="string"&&e.toLowerCase()==="svg";function V1(e,{style:t,vars:n},s,o){Object.assign(e.style,t,o&&o.getProjectionStyles(s));for(const l in n)e.style.setProperty(l,n[l])}const B1=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function U1(e,t,n,s){V1(e,t,void 0,s);for(const o in t.attrs)e.setAttribute(B1.has(o)?o:Dh(o),t.attrs[o])}const ac={};function uO(e){Object.assign(ac,e)}function z1(e,{layout:t,layoutId:n}){return Ls.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ac[e]||e==="opacity")}function Wh(e,t,n){var s;const{style:o}=e,l={};for(const c in o)(kt(o[c])||t.style&&kt(t.style[c])||z1(c,e)||((s=n==null?void 0:n.getValue(c))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(l[c]=o[c]);return l}function $1(e,t,n){const s=Wh(e,t,n);for(const o in e)if(kt(e[o])||kt(t[o])){const l=ji.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;s[l]=e[o]}return s}function dO(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const Iv=["x","y","width","height","cx","cy","r"],fO={useVisualState:L1({scrapeMotionValuesFromProps:$1,createRenderState:F1,onUpdate:({props:e,prevProps:t,current:n,renderState:s,latestValues:o})=>{if(!n)return;let l=!!e.drag;if(!l){for(const d in o)if(Ls.has(d)){l=!0;break}}if(!l)return;let c=!t;if(t)for(let d=0;d{dO(n,s),Me.render(()=>{zh(s,o,Hh(n.tagName),e.transformTemplate),U1(n,s)})})}})},hO={useVisualState:L1({scrapeMotionValuesFromProps:Wh,createRenderState:$h})};function H1(e,t,n){for(const s in t)!kt(t[s])&&!z1(s,n)&&(e[s]=t[s])}function pO({transformTemplate:e},t){return T.useMemo(()=>{const n=$h();return Uh(n,t,e),Object.assign({},n.vars,n.style)},[t])}function mO(e,t){const n=e.style||{},s={};return H1(s,n,e),Object.assign(s,pO(e,t)),s}function gO(e,t){const n={},s=mO(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}function yO(e,t,n,s){const o=T.useMemo(()=>{const l=F1();return zh(l,t,Hh(s),e.transformTemplate),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};H1(l,e.style,e),o.style={...l,...o.style}}return o}function vO(e=!1){return(n,s,o,{latestValues:l},c)=>{const f=(Ih(n)?yO:gO)(s,l,c,n),p=j2(s,typeof n=="string",e),g=n!==T.Fragment?{...p,...f,ref:o}:{},{children:y}=s,x=T.useMemo(()=>kt(y)?y.get():y,[y]);return T.createElement(n,{...g,children:x})}}function xO(e,t){return function(s,{forwardMotionProps:o}={forwardMotionProps:!1}){const c={...Ih(s)?fO:hO,preloadedFeatures:e,useRender:vO(o),createVisualElement:t,Component:s};return z2(c)}}function W1(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;swindow.ScrollTimeline!==void 0);class wO{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let s=0;s{if(q1()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{s.forEach((o,l)=>{o&&o(),this.animations[l].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class bO extends wO{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function qh(e,t){return e?e[t]||e.default||e:void 0}const Mf=2e4;function Q1(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t=Mf?1/0:t}function Qh(e){return typeof e=="function"}function Fv(e,t){e.timeline=t,e.onfinish=null}const Kh=e=>Array.isArray(e)&&typeof e[0]=="number",SO={linearEasing:void 0};function EO(e,t){const n=Oh(e);return()=>{var s;return(s=SO[t])!==null&&s!==void 0?s:n()}}const lc=EO(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),K1=(e,t,n=10)=>{let s="";const o=Math.max(Math.round(t/n),2);for(let l=0;l`cubic-bezier(${e}, ${t}, ${n}, ${s})`,If={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Lo([0,.65,.55,1]),circOut:Lo([.55,0,1,.45]),backIn:Lo([.31,.01,.66,-.59]),backOut:Lo([.33,1.53,.69,.99])};function Y1(e,t){if(e)return typeof e=="function"&&lc()?K1(e,t):Kh(e)?Lo(e):Array.isArray(e)?e.map(n=>Y1(n,t)||If.easeOut):If[e]}const bn={x:!1,y:!1};function X1(){return bn.x||bn.y}function Gh(e,t,n){var s;if(e instanceof Element)return[e];if(typeof e=="string"){let o=document;const l=(s=void 0)!==null&&s!==void 0?s:o.querySelectorAll(e);return l?Array.from(l):[]}return Array.from(e)}function Z1(e,t){const n=Gh(e),s=new AbortController,o={passive:!0,...t,signal:s.signal};return[n,o,()=>s.abort()]}function Vv(e){return t=>{t.pointerType==="touch"||X1()||e(t)}}function CO(e,t,n={}){const[s,o,l]=Z1(e,n),c=Vv(d=>{const{target:f}=d,p=t(d);if(typeof p!="function"||!f)return;const g=Vv(y=>{p(y),f.removeEventListener("pointerleave",g)});f.addEventListener("pointerleave",g,o)});return s.forEach(d=>{d.addEventListener("pointerenter",c,o)}),l}const J1=(e,t)=>t?e===t?!0:J1(e,t.parentElement):!1,Yh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,TO=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function _O(e){return TO.has(e.tagName)||e.tabIndex!==-1}const Do=new WeakSet;function Bv(e){return t=>{t.key==="Enter"&&e(t)}}function Ud(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const kO=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=Bv(()=>{if(Do.has(n))return;Ud(n,"down");const o=Bv(()=>{Ud(n,"up")}),l=()=>Ud(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",l,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function Uv(e){return Yh(e)&&!X1()}function PO(e,t,n={}){const[s,o,l]=Z1(e,n),c=d=>{const f=d.currentTarget;if(!Uv(d)||Do.has(f))return;Do.add(f);const p=t(d),g=(E,P)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",x),!(!Uv(E)||!Do.has(f))&&(Do.delete(f),typeof p=="function"&&p(E,{success:P}))},y=E=>{g(E,n.useGlobalTarget||J1(f,E.target))},x=E=>{g(E,!1)};window.addEventListener("pointerup",y,o),window.addEventListener("pointercancel",x,o)};return s.forEach(d=>{!_O(d)&&d.getAttribute("tabindex")===null&&(d.tabIndex=0),(n.useGlobalTarget?window:d).addEventListener("pointerdown",c,o),d.addEventListener("focus",p=>kO(p,o),o)}),l}function RO(e){return e==="x"||e==="y"?bn[e]?null:(bn[e]=!0,()=>{bn[e]=!1}):bn.x||bn.y?null:(bn.x=bn.y=!0,()=>{bn.x=bn.y=!1})}const eb=new Set(["width","height","top","left","right","bottom",...ji]);let Gl;function AO(){Gl=void 0}const Fn={now:()=>(Gl===void 0&&Fn.set(dt.isProcessing||k2.useManualTiming?dt.timestamp:performance.now()),Gl),set:e=>{Gl=e,queueMicrotask(AO)}};function Xh(e,t){e.indexOf(t)===-1&&e.push(t)}function Zh(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Jh{constructor(){this.subscriptions=[]}add(t){return Xh(this.subscriptions,t),()=>Zh(this.subscriptions,t)}notify(t,n,s){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,s);else for(let l=0;l!isNaN(parseFloat(e)),Vo={current:void 0};class OO{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,o=!0)=>{const l=Fn.now();this.updatedAt!==l&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Fn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=NO(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Jh);const s=this.events[t].add(n);return t==="change"?()=>{s(),Me.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Vo.current&&Vo.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Fn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>zv)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,zv);return ep(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Dn(e,t){return new OO(e,t)}function jO(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Dn(n))}function LO(e,t){const n=kc(e,t);let{transitionEnd:s={},transition:o={},...l}=n||{};l={...l,...s};for(const c in l){const d=K2(l[c]);jO(e,c,d)}}function DO(e){return!!(kt(e)&&e.add)}function Ff(e,t){const n=e.getValue("willChange");if(DO(n))return n.add(t)}function tb(e){return e.props[N1]}const nb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,MO=1e-7,IO=12;function FO(e,t,n,s,o){let l,c,d=0;do c=t+(n-t)/2,l=nb(c,s,o)-e,l>0?n=c:t=c;while(Math.abs(l)>MO&&++dFO(l,0,1,e,n);return l=>l===0||l===1?l:nb(o(l),t,s)}const rb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,sb=e=>t=>1-e(1-t),ib=fa(.33,1.53,.69,.99),tp=sb(ib),ob=rb(tp),ab=e=>(e*=2)<1?.5*tp(e):.5*(2-Math.pow(2,-10*(e-1))),np=e=>1-Math.sin(Math.acos(e)),lb=sb(np),cb=rb(np),ub=e=>/^0[^.\s]+$/u.test(e);function VO(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ub(e):!0}const Bo=e=>Math.round(e*1e5)/1e5,rp=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function BO(e){return e==null}const UO=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,sp=(e,t)=>n=>!!(typeof n=="string"&&UO.test(n)&&n.startsWith(e)||t&&!BO(n)&&Object.prototype.hasOwnProperty.call(n,t)),db=(e,t,n)=>s=>{if(typeof s!="string")return s;const[o,l,c,d]=s.match(rp);return{[e]:parseFloat(o),[t]:parseFloat(l),[n]:parseFloat(c),alpha:d!==void 0?parseFloat(d):1}},zO=e=>Bn(0,255,e),zd={...Li,transform:e=>Math.round(zO(e))},ps={test:sp("rgb","red"),parse:db("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+zd.transform(e)+", "+zd.transform(t)+", "+zd.transform(n)+", "+Bo(Yo.transform(s))+")"};function $O(e){let t="",n="",s="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,s+=s,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:o?parseInt(o,16)/255:1}}const Vf={test:sp("#"),parse:$O,transform:ps.transform},li={test:sp("hsl","hue"),parse:db("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+In.transform(Bo(t))+", "+In.transform(Bo(n))+", "+Bo(Yo.transform(s))+")"},_t={test:e=>ps.test(e)||Vf.test(e)||li.test(e),parse:e=>ps.test(e)?ps.parse(e):li.test(e)?li.parse(e):Vf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ps.transform(e):li.transform(e)},HO=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function WO(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(rp))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(HO))===null||n===void 0?void 0:n.length)||0)>0}const fb="number",hb="color",qO="var",QO="var(",$v="${}",KO=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Xo(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},o=[];let l=0;const d=t.replace(KO,f=>(_t.test(f)?(s.color.push(l),o.push(hb),n.push(_t.parse(f))):f.startsWith(QO)?(s.var.push(l),o.push(qO),n.push(f)):(s.number.push(l),o.push(fb),n.push(parseFloat(f))),++l,$v)).split($v);return{values:n,split:d,indexes:s,types:o}}function pb(e){return Xo(e).values}function mb(e){const{split:t,types:n}=Xo(e),s=t.length;return o=>{let l="";for(let c=0;ctypeof e=="number"?0:e;function YO(e){const t=pb(e);return mb(e)(t.map(GO))}const $r={test:WO,parse:pb,createTransformer:mb,getAnimatableNone:YO},XO=new Set(["brightness","contrast","saturate","opacity"]);function ZO(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(rp)||[];if(!s)return e;const o=n.replace(s,"");let l=XO.has(t)?1:0;return s!==n&&(l*=100),t+"("+l+o+")"}const JO=/\b([a-z-]*)\(.*?\)/gu,Bf={...$r,getAnimatableNone:e=>{const t=e.match(JO);return t?t.map(ZO).join(" "):e}},ej={...Bh,color:_t,backgroundColor:_t,outlineColor:_t,fill:_t,stroke:_t,borderColor:_t,borderTopColor:_t,borderRightColor:_t,borderBottomColor:_t,borderLeftColor:_t,filter:Bf,WebkitFilter:Bf},ip=e=>ej[e];function gb(e,t){let n=ip(e);return n!==Bf&&(n=$r),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const tj=new Set(["auto","none","0"]);function nj(e,t,n){let s=0,o;for(;se===Li||e===ye,Wv=(e,t)=>parseFloat(e.split(", ")[t]),qv=(e,t)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const o=s.match(/^matrix3d\((.+)\)$/u);if(o)return Wv(o[1],t);{const l=s.match(/^matrix\((.+)\)$/u);return l?Wv(l[1],e):0}},rj=new Set(["x","y","z"]),sj=ji.filter(e=>!rj.has(e));function ij(e){const t=[];return sj.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Pi={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:qv(4,13),y:qv(5,14)};Pi.translateX=Pi.x;Pi.translateY=Pi.y;const _s=new Set;let Uf=!1,zf=!1;function yb(){if(zf){const e=Array.from(_s).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const o=ij(s);o.length&&(n.set(s,o),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const o=n.get(s);o&&o.forEach(([l,c])=>{var d;(d=s.getValue(l))===null||d===void 0||d.set(c)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}zf=!1,Uf=!1,_s.forEach(e=>e.complete()),_s.clear()}function vb(){_s.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(zf=!0)})}function oj(){vb(),yb()}class op{constructor(t,n,s,o,l,c=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=o,this.element=l,this.isAsync=c}scheduleResolve(){this.isScheduled=!0,this.isAsync?(_s.add(this),Uf||(Uf=!0,Me.read(vb),Me.resolveKeyframes(yb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:o}=this;for(let l=0;l/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),aj=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function lj(e){const t=aj.exec(e);if(!t)return[,];const[,n,s,o]=t;return[`--${n??s}`,o]}function wb(e,t,n=1){const[s,o]=lj(e);if(!s)return;const l=window.getComputedStyle(t).getPropertyValue(s);if(l){const c=l.trim();return xb(c)?parseFloat(c):c}return Vh(o)?wb(o,t,n+1):o}const bb=e=>t=>t.test(e),cj={test:e=>e==="auto",parse:e=>e},Sb=[Li,ye,In,Ar,eO,J2,cj],Qv=e=>Sb.find(bb(e));class Eb extends op{constructor(t,n,s,o,l){super(t,n,s,o,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let f=0;f{n.getValue(f).set(p)}),this.resolveNoneKeyframes()}}const Kv=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&($r.test(e)||e==="0")&&!e.startsWith("url("));function uj(e){const t=e[0];if(e.length===1)return!0;for(let n=0;ne!==null;function Pc(e,{repeat:t,repeatType:n="loop"},s){const o=e.filter(fj),l=t&&n!=="loop"&&t%2===1?0:o.length-1;return!l||s===void 0?o[l]:s}const hj=40;class Cb{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:o=0,repeatDelay:l=0,repeatType:c="loop",...d}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Fn.now(),this.options={autoplay:t,delay:n,type:s,repeat:o,repeatDelay:l,repeatType:c,...d},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>hj?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&oj(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Fn.now(),this.hasAttemptedResolve=!0;const{name:s,type:o,velocity:l,delay:c,onComplete:d,onUpdate:f,isGenerator:p}=this.options;if(!p&&!dj(t,s,o,l))if(c)this.options.duration=0;else{f&&f(Pc(t,this.options,n)),d&&d(),this.resolveFinishedPromise();return}const g=this.initPlayback(t,n);g!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...g},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const qe=(e,t,n)=>e+(t-e)*n;function $d(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function pj({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let o=0,l=0,c=0;if(!t)o=l=c=n;else{const d=n<.5?n*(1+t):n+t-n*t,f=2*n-d;o=$d(f,d,e+1/3),l=$d(f,d,e),c=$d(f,d,e-1/3)}return{red:Math.round(o*255),green:Math.round(l*255),blue:Math.round(c*255),alpha:s}}function cc(e,t){return n=>n>0?t:e}const Hd=(e,t,n)=>{const s=e*e,o=n*(t*t-s)+s;return o<0?0:Math.sqrt(o)},mj=[Vf,ps,li],gj=e=>mj.find(t=>t.test(e));function Gv(e){const t=gj(e);if(!t)return!1;let n=t.parse(e);return t===li&&(n=pj(n)),n}const Yv=(e,t)=>{const n=Gv(e),s=Gv(t);if(!n||!s)return cc(e,t);const o={...n};return l=>(o.red=Hd(n.red,s.red,l),o.green=Hd(n.green,s.green,l),o.blue=Hd(n.blue,s.blue,l),o.alpha=qe(n.alpha,s.alpha,l),ps.transform(o))},yj=(e,t)=>n=>t(e(n)),ha=(...e)=>e.reduce(yj),$f=new Set(["none","hidden"]);function vj(e,t){return $f.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function xj(e,t){return n=>qe(e,t,n)}function ap(e){return typeof e=="number"?xj:typeof e=="string"?Vh(e)?cc:_t.test(e)?Yv:Sj:Array.isArray(e)?Tb:typeof e=="object"?_t.test(e)?Yv:wj:cc}function Tb(e,t){const n=[...e],s=n.length,o=e.map((l,c)=>ap(l)(l,t[c]));return l=>{for(let c=0;c{for(const l in s)n[l]=s[l](o);return n}}function bj(e,t){var n;const s=[],o={color:0,var:0,number:0};for(let l=0;l{const n=$r.createTransformer(t),s=Xo(e),o=Xo(t);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?$f.has(e)&&!o.values.length||$f.has(t)&&!s.values.length?vj(e,t):ha(Tb(bj(s,o),o.values),n):cc(e,t)};function _b(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?qe(e,t,n):ap(e)(e,t)}const Ej=5;function kb(e,t,n){const s=Math.max(t-Ej,0);return ep(n-e(s),t-s)}const Ge={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Wd=.001;function Cj({duration:e=Ge.duration,bounce:t=Ge.bounce,velocity:n=Ge.velocity,mass:s=Ge.mass}){let o,l,c=1-t;c=Bn(Ge.minDamping,Ge.maxDamping,c),e=Bn(Ge.minDuration,Ge.maxDuration,sr(e)),c<1?(o=p=>{const g=p*c,y=g*e,x=g-n,E=Hf(p,c),P=Math.exp(-y);return Wd-x/E*P},l=p=>{const y=p*c*e,x=y*n+n,E=Math.pow(c,2)*Math.pow(p,2)*e,P=Math.exp(-y),C=Hf(Math.pow(p,2),c);return(-o(p)+Wd>0?-1:1)*((x-E)*P)/C}):(o=p=>{const g=Math.exp(-p*e),y=(p-n)*e+1;return-Wd+g*y},l=p=>{const g=Math.exp(-p*e),y=(n-p)*(e*e);return g*y});const d=5/e,f=_j(o,l,d);if(e=rr(e),isNaN(f))return{stiffness:Ge.stiffness,damping:Ge.damping,duration:e};{const p=Math.pow(f,2)*s;return{stiffness:p,damping:c*2*Math.sqrt(s*p),duration:e}}}const Tj=12;function _j(e,t,n){let s=n;for(let o=1;oe[n]!==void 0)}function Rj(e){let t={velocity:Ge.velocity,stiffness:Ge.stiffness,damping:Ge.damping,mass:Ge.mass,isResolvedFromDuration:!1,...e};if(!Xv(e,Pj)&&Xv(e,kj))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),o=s*s,l=2*Bn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Ge.mass,stiffness:o,damping:l}}else{const n=Cj(e);t={...t,...n,mass:Ge.mass},t.isResolvedFromDuration=!0}return t}function Pb(e=Ge.visualDuration,t=Ge.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:o}=n;const l=n.keyframes[0],c=n.keyframes[n.keyframes.length-1],d={done:!1,value:l},{stiffness:f,damping:p,mass:g,duration:y,velocity:x,isResolvedFromDuration:E}=Rj({...n,velocity:-sr(n.velocity||0)}),P=x||0,C=p/(2*Math.sqrt(f*g)),b=c-l,S=sr(Math.sqrt(f/g)),R=Math.abs(b)<5;s||(s=R?Ge.restSpeed.granular:Ge.restSpeed.default),o||(o=R?Ge.restDelta.granular:Ge.restDelta.default);let k;if(C<1){const M=Hf(S,C);k=U=>{const W=Math.exp(-C*S*U);return c-W*((P+C*S*b)/M*Math.sin(M*U)+b*Math.cos(M*U))}}else if(C===1)k=M=>c-Math.exp(-S*M)*(b+(P+S*b)*M);else{const M=S*Math.sqrt(C*C-1);k=U=>{const W=Math.exp(-C*S*U),V=Math.min(M*U,300);return c-W*((P+C*S*b)*Math.sinh(V)+M*b*Math.cosh(V))/M}}const A={calculatedDuration:E&&y||null,next:M=>{const U=k(M);if(E)d.done=M>=y;else{let W=0;C<1&&(W=M===0?rr(P):kb(k,M,U));const V=Math.abs(W)<=s,Y=Math.abs(c-U)<=o;d.done=V&&Y}return d.value=d.done?c:U,d},toString:()=>{const M=Math.min(Q1(A),Mf),U=K1(W=>A.next(M*W).value,M,30);return M+"ms "+U}};return A}function Zv({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:o=10,bounceStiffness:l=500,modifyTarget:c,min:d,max:f,restDelta:p=.5,restSpeed:g}){const y=e[0],x={done:!1,value:y},E=V=>d!==void 0&&Vf,P=V=>d===void 0?f:f===void 0||Math.abs(d-V)-C*Math.exp(-V/s),k=V=>S+R(V),A=V=>{const Y=R(V),ne=k(V);x.done=Math.abs(Y)<=p,x.value=x.done?S:ne};let M,U;const W=V=>{E(x.value)&&(M=V,U=Pb({keyframes:[x.value,P(x.value)],velocity:kb(k,V,x.value),damping:o,stiffness:l,restDelta:p,restSpeed:g}))};return W(0),{calculatedDuration:null,next:V=>{let Y=!1;return!U&&M===void 0&&(Y=!0,A(V),W(V)),M!==void 0&&V>=M?U.next(V-M):(!Y&&A(V),x)}}}const Aj=fa(.42,0,1,1),Nj=fa(0,0,.58,1),Rb=fa(.42,0,.58,1),Oj=e=>Array.isArray(e)&&typeof e[0]!="number",jj={linear:Ot,easeIn:Aj,easeInOut:Rb,easeOut:Nj,circIn:np,circInOut:cb,circOut:lb,backIn:tp,backInOut:ob,backOut:ib,anticipate:ab},Jv=e=>{if(Kh(e)){_1(e.length===4);const[t,n,s,o]=e;return fa(t,n,s,o)}else if(typeof e=="string")return jj[e];return e};function Lj(e,t,n){const s=[],o=n||_b,l=e.length-1;for(let c=0;ct[0];if(l===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const d=Lj(t,s,o),f=d.length,p=g=>{if(c&&g1)for(;yp(Bn(e[0],e[l-1],g)):p}function Dj(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const o=Os(0,t,s);e.push(qe(n,1,o))}}function Ab(e){const t=[0];return Dj(t,e.length-1),t}function Mj(e,t){return e.map(n=>n*t)}function Ij(e,t){return e.map(()=>t||Rb).splice(0,e.length-1)}function uc({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const o=Oj(s)?s.map(Jv):Jv(s),l={done:!1,value:t[0]},c=Mj(n&&n.length===t.length?n:Ab(t),e),d=lp(c,t,{ease:Array.isArray(o)?o:Ij(t,o)});return{calculatedDuration:e,next:f=>(l.value=d(f),l.done=f>=e,l)}}const Fj=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Me.update(t,!0),stop:()=>Tn(t),now:()=>dt.isProcessing?dt.timestamp:Fn.now()}},Vj={decay:Zv,inertia:Zv,tween:uc,keyframes:uc,spring:Pb},Bj=e=>e/100;class cp extends Cb{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:f}=this.options;f&&f()};const{name:n,motionValue:s,element:o,keyframes:l}=this.options,c=(o==null?void 0:o.KeyframeResolver)||op,d=(f,p)=>this.onKeyframesResolved(f,p);this.resolver=new c(l,d,n,s,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:l,velocity:c=0}=this.options,d=Qh(n)?n:Vj[n]||uc;let f,p;d!==uc&&typeof t[0]!="number"&&(f=ha(Bj,_b(t[0],t[1])),t=[0,100]);const g=d({...this.options,keyframes:t});l==="mirror"&&(p=d({...this.options,keyframes:[...t].reverse(),velocity:-c})),g.calculatedDuration===null&&(g.calculatedDuration=Q1(g));const{calculatedDuration:y}=g,x=y+o,E=x*(s+1)-o;return{generator:g,mirroredGenerator:p,mapPercentToKeyframes:f,calculatedDuration:y,resolvedDuration:x,totalDuration:E}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:s}=this;if(!s){const{keyframes:V}=this.options;return{done:!0,value:V[V.length-1]}}const{finalKeyframe:o,generator:l,mirroredGenerator:c,mapPercentToKeyframes:d,keyframes:f,calculatedDuration:p,totalDuration:g,resolvedDuration:y}=s;if(this.startTime===null)return l.next(0);const{delay:x,repeat:E,repeatType:P,repeatDelay:C,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-g/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const S=this.currentTime-x*(this.speed>=0?1:-1),R=this.speed>=0?S<0:S>g;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=g);let k=this.currentTime,A=l;if(E){const V=Math.min(this.currentTime,g)/y;let Y=Math.floor(V),ne=V%1;!ne&&V>=1&&(ne=1),ne===1&&Y--,Y=Math.min(Y,E+1),!!(Y%2)&&(P==="reverse"?(ne=1-ne,C&&(ne-=C/y)):P==="mirror"&&(A=c)),k=Bn(0,1,ne)*y}const M=R?{done:!1,value:f[0]}:A.next(k);d&&(M.value=d(M.value));let{done:U}=M;!R&&p!==null&&(U=this.speed>=0?this.currentTime>=g:this.currentTime<=0);const W=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&U);return W&&o!==void 0&&(M.value=Pc(f,this.options,o)),b&&b(M.value),W&&this.finish(),M}get duration(){const{resolved:t}=this;return t?sr(t.calculatedDuration):0}get time(){return sr(this.currentTime)}set time(t){t=rr(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=sr(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Fj,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=t(l=>this.tick(l))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Uj=new Set(["opacity","clipPath","filter","transform"]);function zj(e,t,n,{delay:s=0,duration:o=300,repeat:l=0,repeatType:c="loop",ease:d="easeInOut",times:f}={}){const p={[t]:n};f&&(p.offset=f);const g=Y1(d,o);return Array.isArray(g)&&(p.easing=g),e.animate(p,{delay:s,duration:o,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:l+1,direction:c==="reverse"?"alternate":"normal"})}const $j=Oh(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),dc=10,Hj=2e4;function Wj(e){return Qh(e.type)||e.type==="spring"||!G1(e.ease)}function qj(e,t){const n=new cp({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:e[0]};const o=[];let l=0;for(;!s.done&&lthis.onKeyframesResolved(c,d),n,s,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:s=300,times:o,ease:l,type:c,motionValue:d,name:f,startTime:p}=this.options;if(!d.owner||!d.owner.current)return!1;if(typeof l=="string"&&lc()&&Qj(l)&&(l=Nb[l]),Wj(this.options)){const{onComplete:y,onUpdate:x,motionValue:E,element:P,...C}=this.options,b=qj(t,C);t=b.keyframes,t.length===1&&(t[1]=t[0]),s=b.duration,o=b.times,l=b.ease,c="keyframes"}const g=zj(d.owner.current,f,t,{...this.options,duration:s,times:o,ease:l});return g.startTime=p??this.calcStartTime(),this.pendingTimeline?(Fv(g,this.pendingTimeline),this.pendingTimeline=void 0):g.onfinish=()=>{const{onComplete:y}=this.options;d.set(Pc(t,this.options,n)),y&&y(),this.cancel(),this.resolveFinishedPromise()},{animation:g,duration:s,times:o,type:c,ease:l,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return sr(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return sr(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=rr(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ot;const{animation:s}=n;Fv(s,t)}return Ot}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:s,duration:o,type:l,ease:c,times:d}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:p,onUpdate:g,onComplete:y,element:x,...E}=this.options,P=new cp({...E,keyframes:s,duration:o,type:l,ease:c,times:d,isGenerator:!0}),C=rr(this.time);p.setWithVelocity(P.sample(C-dc).value,P.sample(C).value,dc)}const{onStop:f}=this.options;f&&f(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:s,repeatDelay:o,repeatType:l,damping:c,type:d}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:f,transformTemplate:p}=n.owner.getProps();return $j()&&s&&Uj.has(s)&&!f&&!p&&!o&&l!=="mirror"&&c!==0&&d!=="inertia"}}const Kj={type:"spring",stiffness:500,damping:25,restSpeed:10},Gj=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Yj={type:"keyframes",duration:.8},Xj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Zj=(e,{keyframes:t})=>t.length>2?Yj:Ls.has(e)?e.startsWith("scale")?Gj(t[1]):Kj:Xj;function Jj({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:o,repeat:l,repeatType:c,repeatDelay:d,from:f,elapsed:p,...g}){return!!Object.keys(g).length}const up=(e,t,n,s={},o,l)=>c=>{const d=qh(s,e)||{},f=d.delay||s.delay||0;let{elapsed:p=0}=s;p=p-rr(f);let g={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...d,delay:-p,onUpdate:x=>{t.set(x),d.onUpdate&&d.onUpdate(x)},onComplete:()=>{c(),d.onComplete&&d.onComplete()},name:e,motionValue:t,element:l?void 0:o};Jj(d)||(g={...g,...Zj(e,g)}),g.duration&&(g.duration=rr(g.duration)),g.repeatDelay&&(g.repeatDelay=rr(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let y=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(g.duration=0,g.delay===0&&(y=!0)),y&&!l&&t.get()!==void 0){const x=Pc(g.keyframes,d);if(x!==void 0)return Me.update(()=>{g.onUpdate(x),g.onComplete()}),new bO([])}return!l&&e0.supports(g)?new e0(g):new cp(g)};function eL({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Ob(e,t,{delay:n=0,transitionOverride:s,type:o}={}){var l;let{transition:c=e.getDefaultTransition(),transitionEnd:d,...f}=t;s&&(c=s);const p=[],g=o&&e.animationState&&e.animationState.getState()[o];for(const y in f){const x=e.getValue(y,(l=e.latestValues[y])!==null&&l!==void 0?l:null),E=f[y];if(E===void 0||g&&eL(g,y))continue;const P={delay:n,...qh(c||{},y)};let C=!1;if(window.MotionHandoffAnimation){const S=tb(e);if(S){const R=window.MotionHandoffAnimation(S,y,Me);R!==null&&(P.startTime=R,C=!0)}}Ff(e,y),x.start(up(y,x,E,e.shouldReduceMotion&&eb.has(y)?{type:!1}:P,e,C));const b=x.animation;b&&p.push(b)}return d&&Promise.all(p).then(()=>{Me.update(()=>{d&&LO(e,d)})}),p}function Wf(e,t,n={}){var s;const o=kc(e,t,n.type==="exit"?(s=e.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:l=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(l=n.transitionOverride);const c=o?()=>Promise.all(Ob(e,o,n)):()=>Promise.resolve(),d=e.variantChildren&&e.variantChildren.size?(p=0)=>{const{delayChildren:g=0,staggerChildren:y,staggerDirection:x}=l;return tL(e,t,g+p,y,x,n)}:()=>Promise.resolve(),{when:f}=l;if(f){const[p,g]=f==="beforeChildren"?[c,d]:[d,c];return p().then(()=>g())}else return Promise.all([c(),d(n.delay)])}function tL(e,t,n=0,s=0,o=1,l){const c=[],d=(e.variantChildren.size-1)*s,f=o===1?(p=0)=>p*s:(p=0)=>d-p*s;return Array.from(e.variantChildren).sort(nL).forEach((p,g)=>{p.notify("AnimationStart",t),c.push(Wf(p,t,{...l,delay:n+f(g)}).then(()=>p.notify("AnimationComplete",t)))}),Promise.all(c)}function nL(e,t){return e.sortNodePosition(t)}function rL(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const o=t.map(l=>Wf(e,l,n));s=Promise.all(o)}else if(typeof t=="string")s=Wf(e,t,n);else{const o=typeof t=="function"?kc(e,t,n.custom):t;s=Promise.all(Ob(e,o,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const sL=Lh.length;function jb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?jb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:s})=>rL(e,n,s)))}function lL(e){let t=aL(e),n=t0(),s=!0;const o=f=>(p,g)=>{var y;const x=kc(e,g,f==="exit"?(y=e.presenceContext)===null||y===void 0?void 0:y.custom:void 0);if(x){const{transition:E,transitionEnd:P,...C}=x;p={...p,...C,...P}}return p};function l(f){t=f(e)}function c(f){const{props:p}=e,g=jb(e.parent)||{},y=[],x=new Set;let E={},P=1/0;for(let b=0;bP&&A,Y=!1;const ne=Array.isArray(k)?k:[k];let ve=ne.reduce(o(S),{});M===!1&&(ve={});const{prevResolvedValues:_e={}}=R,be={..._e,...ve},J=ue=>{V=!0,x.has(ue)&&(Y=!0,x.delete(ue)),R.needsAnimating[ue]=!0;const K=e.getValue(ue);K&&(K.liveStyle=!1)};for(const ue in be){const K=ve[ue],se=_e[ue];if(E.hasOwnProperty(ue))continue;let z=!1;Df(K)&&Df(se)?z=!W1(K,se):z=K!==se,z?K!=null?J(ue):x.add(ue):K!==void 0&&x.has(ue)?J(ue):R.protectedKeys[ue]=!0}R.prevProp=k,R.prevResolvedValues=ve,R.isActive&&(E={...E,...ve}),s&&e.blockInitialAnimation&&(V=!1),V&&(!(U&&W)||Y)&&y.push(...ne.map(ue=>({animation:ue,options:{type:S}})))}if(x.size){const b={};x.forEach(S=>{const R=e.getBaseTarget(S),k=e.getValue(S);k&&(k.liveStyle=!0),b[S]=R??null}),y.push({animation:b})}let C=!!y.length;return s&&(p.initial===!1||p.initial===p.animate)&&!e.manuallyAnimateOnMount&&(C=!1),s=!1,C?t(y):Promise.resolve()}function d(f,p){var g;if(n[f].isActive===p)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(x=>{var E;return(E=x.animationState)===null||E===void 0?void 0:E.setActive(f,p)}),n[f].isActive=p;const y=c(f);for(const x in n)n[x].protectedKeys={};return y}return{animateChanges:c,setActive:d,setAnimateFunction:l,getState:()=>n,reset:()=>{n=t0(),s=!0}}}function cL(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!W1(t,e):!1}function ls(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function t0(){return{animate:ls(!0),whileInView:ls(),whileHover:ls(),whileTap:ls(),whileDrag:ls(),whileFocus:ls(),exit:ls()}}class qr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class uL extends qr{constructor(t){super(t),t.animationState||(t.animationState=lL(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Tc(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let dL=0;class fL extends qr{constructor(){super(...arguments),this.id=dL++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const hL={animation:{Feature:uL},exit:{Feature:fL}};function Zo(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function pa(e){return{point:{x:e.pageX,y:e.pageY}}}const pL=e=>t=>Yh(t)&&e(t,pa(t));function Uo(e,t,n,s){return Zo(e,t,pL(n),s)}const n0=(e,t)=>Math.abs(e-t);function mL(e,t){const n=n0(e.x,t.x),s=n0(e.y,t.y);return Math.sqrt(n**2+s**2)}class Lb{constructor(t,n,{transformPagePoint:s,contextWindow:o,dragSnapToOrigin:l=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Qd(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,E=mL(y.offset,{x:0,y:0})>=3;if(!x&&!E)return;const{point:P}=y,{timestamp:C}=dt;this.history.push({...P,timestamp:C});const{onStart:b,onMove:S}=this.handlers;x||(b&&b(this.lastMoveEvent,y),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,y)},this.handlePointerMove=(y,x)=>{this.lastMoveEvent=y,this.lastMoveEventInfo=qd(x,this.transformPagePoint),Me.update(this.updatePoint,!0)},this.handlePointerUp=(y,x)=>{this.end();const{onEnd:E,onSessionEnd:P,resumeAnimation:C}=this.handlers;if(this.dragSnapToOrigin&&C&&C(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Qd(y.type==="pointercancel"?this.lastMoveEventInfo:qd(x,this.transformPagePoint),this.history);this.startEvent&&E&&E(y,b),P&&P(y,b)},!Yh(t))return;this.dragSnapToOrigin=l,this.handlers=n,this.transformPagePoint=s,this.contextWindow=o||window;const c=pa(t),d=qd(c,this.transformPagePoint),{point:f}=d,{timestamp:p}=dt;this.history=[{...f,timestamp:p}];const{onSessionStart:g}=n;g&&g(t,Qd(d,this.history)),this.removeListeners=ha(Uo(this.contextWindow,"pointermove",this.handlePointerMove),Uo(this.contextWindow,"pointerup",this.handlePointerUp),Uo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Tn(this.updatePoint)}}function qd(e,t){return t?{point:t(e.point)}:e}function r0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Qd({point:e},t){return{point:e,delta:r0(e,Db(t)),offset:r0(e,gL(t)),velocity:yL(t,.1)}}function gL(e){return e[0]}function Db(e){return e[e.length-1]}function yL(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const o=Db(e);for(;n>=0&&(s=e[n],!(o.timestamp-s.timestamp>rr(t)));)n--;if(!s)return{x:0,y:0};const l=sr(o.timestamp-s.timestamp);if(l===0)return{x:0,y:0};const c={x:(o.x-s.x)/l,y:(o.y-s.y)/l};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}const Mb=1e-4,vL=1-Mb,xL=1+Mb,Ib=.01,wL=0-Ib,bL=0+Ib;function Gt(e){return e.max-e.min}function SL(e,t,n){return Math.abs(e-t)<=n}function s0(e,t,n,s=.5){e.origin=s,e.originPoint=qe(t.min,t.max,e.origin),e.scale=Gt(n)/Gt(t),e.translate=qe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=vL&&e.scale<=xL||isNaN(e.scale))&&(e.scale=1),(e.translate>=wL&&e.translate<=bL||isNaN(e.translate))&&(e.translate=0)}function zo(e,t,n,s){s0(e.x,t.x,n.x,s?s.originX:void 0),s0(e.y,t.y,n.y,s?s.originY:void 0)}function i0(e,t,n){e.min=n.min+t.min,e.max=e.min+Gt(t)}function EL(e,t,n){i0(e.x,t.x,n.x),i0(e.y,t.y,n.y)}function o0(e,t,n){e.min=t.min-n.min,e.max=e.min+Gt(t)}function $o(e,t,n){o0(e.x,t.x,n.x),o0(e.y,t.y,n.y)}function CL(e,{min:t,max:n},s){return t!==void 0&&en&&(e=s?qe(n,e,s.max):Math.min(e,n)),e}function a0(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function TL(e,{top:t,left:n,bottom:s,right:o}){return{x:a0(e.x,n,o),y:a0(e.y,t,s)}}function l0(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.mins?n=Os(t.min,t.max-s,e.min):s>o&&(n=Os(e.min,e.max-o,t.min)),Bn(0,1,n)}function PL(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const qf=.35;function RL(e=qf){return e===!1?e=0:e===!0&&(e=qf),{x:c0(e,"left","right"),y:c0(e,"top","bottom")}}function c0(e,t,n){return{min:u0(e,t),max:u0(e,n)}}function u0(e,t){return typeof e=="number"?e:e[t]||0}const d0=()=>({translate:0,scale:1,origin:0,originPoint:0}),ci=()=>({x:d0(),y:d0()}),f0=()=>({min:0,max:0}),Ze=()=>({x:f0(),y:f0()});function an(e){return[e("x"),e("y")]}function Fb({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function AL({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function NL(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Kd(e){return e===void 0||e===1}function Qf({scale:e,scaleX:t,scaleY:n}){return!Kd(e)||!Kd(t)||!Kd(n)}function us(e){return Qf(e)||Vb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Vb(e){return h0(e.x)||h0(e.y)}function h0(e){return e&&e!=="0%"}function fc(e,t,n){const s=e-n,o=t*s;return n+o}function p0(e,t,n,s,o){return o!==void 0&&(e=fc(e,o,s)),fc(e,n,s)+t}function Kf(e,t=0,n=1,s,o){e.min=p0(e.min,t,n,s,o),e.max=p0(e.max,t,n,s,o)}function Bb(e,{x:t,y:n}){Kf(e.x,t.translate,t.scale,t.originPoint),Kf(e.y,n.translate,n.scale,n.originPoint)}const m0=.999999999999,g0=1.0000000000001;function OL(e,t,n,s=!1){const o=n.length;if(!o)return;t.x=t.y=1;let l,c;for(let d=0;dm0&&(t.x=1),t.ym0&&(t.y=1)}function ui(e,t){e.min=e.min+t,e.max=e.max+t}function y0(e,t,n,s,o=.5){const l=qe(e.min,e.max,o);Kf(e,t,n,l,s)}function di(e,t){y0(e.x,t.x,t.scaleX,t.scale,t.originX),y0(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ub(e,t){return Fb(NL(e.getBoundingClientRect(),t))}function jL(e,t,n){const s=Ub(e,n),{scroll:o}=t;return o&&(ui(s.x,o.offset.x),ui(s.y,o.offset.y)),s}const zb=({current:e})=>e?e.ownerDocument.defaultView:null,LL=new WeakMap;class DL{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ze(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=g=>{const{dragSnapToOrigin:y}=this.getProps();y?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(pa(g).point)},l=(g,y)=>{const{drag:x,dragPropagation:E,onDragStart:P}=this.getProps();if(x&&!E&&(this.openDragLock&&this.openDragLock(),this.openDragLock=RO(x),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),an(b=>{let S=this.getAxisMotionValue(b).get()||0;if(In.test(S)){const{projection:R}=this.visualElement;if(R&&R.layout){const k=R.layout.layoutBox[b];k&&(S=Gt(k)*(parseFloat(S)/100))}}this.originPoint[b]=S}),P&&Me.postRender(()=>P(g,y)),Ff(this.visualElement,"transform");const{animationState:C}=this.visualElement;C&&C.setActive("whileDrag",!0)},c=(g,y)=>{const{dragPropagation:x,dragDirectionLock:E,onDirectionLock:P,onDrag:C}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:b}=y;if(E&&this.currentDirection===null){this.currentDirection=ML(b),this.currentDirection!==null&&P&&P(this.currentDirection);return}this.updateAxis("x",y.point,b),this.updateAxis("y",y.point,b),this.visualElement.render(),C&&C(g,y)},d=(g,y)=>this.stop(g,y),f=()=>an(g=>{var y;return this.getAnimationState(g)==="paused"&&((y=this.getAxisMotionValue(g).animation)===null||y===void 0?void 0:y.play())}),{dragSnapToOrigin:p}=this.getProps();this.panSession=new Lb(t,{onSessionStart:o,onStart:l,onMove:c,onSessionEnd:d,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,contextWindow:zb(this.visualElement)})}stop(t,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:l}=this.getProps();l&&Me.postRender(()=>l(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,s){const{drag:o}=this.getProps();if(!s||!Il(t,o,this.currentDirection))return;const l=this.getAxisMotionValue(t);let c=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(c=CL(c,this.constraints[t],this.elastic[t])),l.set(c)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:s}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,l=this.constraints;n&&ai(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=TL(o.layoutBox,n):this.constraints=!1,this.elastic=RL(s),l!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&an(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=PL(o.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ai(t))return!1;const s=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const l=jL(s,o.root,this.visualElement.getTransformPagePoint());let c=_L(o.layout.layoutBox,l);if(n){const d=n(AL(c));this.hasMutatedConstraints=!!d,d&&(c=Fb(d))}return c}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:o,dragTransition:l,dragSnapToOrigin:c,onDragTransitionEnd:d}=this.getProps(),f=this.constraints||{},p=an(g=>{if(!Il(g,n,this.currentDirection))return;let y=f&&f[g]||{};c&&(y={min:0,max:0});const x=o?200:1e6,E=o?40:1e7,P={type:"inertia",velocity:s?t[g]:0,bounceStiffness:x,bounceDamping:E,timeConstant:750,restDelta:1,restSpeed:10,...l,...y};return this.startAxisValueAnimation(g,P)});return Promise.all(p).then(d)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Ff(this.visualElement,t),s.start(up(t,s,0,n,this.visualElement,!1))}stopAnimation(){an(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){an(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),o=s[n];return o||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){an(n=>{const{drag:s}=this.getProps();if(!Il(n,s,this.currentDirection))return;const{projection:o}=this.visualElement,l=this.getAxisMotionValue(n);if(o&&o.layout){const{min:c,max:d}=o.layout.layoutBox[n];l.set(t[n]-qe(c,d,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!ai(n)||!s||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};an(c=>{const d=this.getAxisMotionValue(c);if(d&&this.constraints!==!1){const f=d.get();o[c]=kL({min:f,max:f},this.constraints[c])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),an(c=>{if(!Il(c,t,null))return;const d=this.getAxisMotionValue(c),{min:f,max:p}=this.constraints[c];d.set(qe(f,p,o[c]))})}addListeners(){if(!this.visualElement.current)return;LL.set(this.visualElement,this);const t=this.visualElement.current,n=Uo(t,"pointerdown",f=>{const{drag:p,dragListener:g=!0}=this.getProps();p&&g&&this.start(f)}),s=()=>{const{dragConstraints:f}=this.getProps();ai(f)&&f.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,l=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Me.read(s);const c=Zo(window,"resize",()=>this.scalePositionWithinConstraints()),d=o.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:p})=>{this.isDragging&&p&&(an(g=>{const y=this.getAxisMotionValue(g);y&&(this.originPoint[g]+=f[g].translate,y.set(y.get()+f[g].translate))}),this.visualElement.render())}));return()=>{c(),n(),l(),d&&d()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:o=!1,dragConstraints:l=!1,dragElastic:c=qf,dragMomentum:d=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:o,dragConstraints:l,dragElastic:c,dragMomentum:d}}}function Il(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function ML(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class IL extends qr{constructor(t){super(t),this.removeGroupControls=Ot,this.removeListeners=Ot,this.controls=new DL(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ot}unmount(){this.removeGroupControls(),this.removeListeners()}}const v0=e=>(t,n)=>{e&&Me.postRender(()=>e(t,n))};class FL extends qr{constructor(){super(...arguments),this.removePointerDownListener=Ot}onPointerDown(t){this.session=new Lb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:zb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:o}=this.node.getProps();return{onSessionStart:v0(t),onStart:v0(n),onMove:s,onEnd:(l,c)=>{delete this.session,o&&Me.postRender(()=>o(l,c))}}}mount(){this.removePointerDownListener=Uo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Yl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function x0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ko={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ye.test(e))e=parseFloat(e);else return e;const n=x0(e,t.target.x),s=x0(e,t.target.y);return`${n}% ${s}%`}},VL={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,o=$r.parse(e);if(o.length>5)return s;const l=$r.createTransformer(e),c=typeof o[0]!="number"?1:0,d=n.x.scale*t.x,f=n.y.scale*t.y;o[0+c]/=d,o[1+c]/=f;const p=qe(d,f,.5);return typeof o[2+c]=="number"&&(o[2+c]/=p),typeof o[3+c]=="number"&&(o[3+c]/=p),l(o)}};class BL extends T.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:o}=this.props,{projection:l}=t;uO(UL),l&&(n.group&&n.group.add(l),s&&s.register&&o&&s.register(l),l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,onExitComplete:()=>this.safeToRemove()})),Yl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:o,isPresent:l}=this.props,c=s.projection;return c&&(c.isPresent=l,o||t.layoutDependency!==n||n===void 0?c.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?c.promote():c.relegate()||Me.postRender(()=>{const d=c.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Mh.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),s&&s.deregister&&s.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function $b(e){const[t,n]=T1(),s=T.useContext(Ah);return v.jsx(BL,{...e,layoutGroup:s,switchLayoutGroup:T.useContext(O1),isPresent:t,safeToRemove:n})}const UL={borderRadius:{...ko,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ko,borderTopRightRadius:ko,borderBottomLeftRadius:ko,borderBottomRightRadius:ko,boxShadow:VL};function zL(e,t,n){const s=kt(e)?e:Dn(e);return s.start(up("",s,t,n)),s.animation}function $L(e){return e instanceof SVGElement&&e.tagName!=="svg"}const HL=(e,t)=>e.depth-t.depth;class WL{constructor(){this.children=[],this.isDirty=!1}add(t){Xh(this.children,t),this.isDirty=!0}remove(t){Zh(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(HL),this.isDirty=!1,this.children.forEach(t)}}function qL(e,t){const n=Fn.now(),s=({timestamp:o})=>{const l=o-n;l>=t&&(Tn(s),e(l-t))};return Me.read(s,!0),()=>Tn(s)}const Hb=["TopLeft","TopRight","BottomLeft","BottomRight"],QL=Hb.length,w0=e=>typeof e=="string"?parseFloat(e):e,b0=e=>typeof e=="number"||ye.test(e);function KL(e,t,n,s,o,l){o?(e.opacity=qe(0,n.opacity!==void 0?n.opacity:1,GL(s)),e.opacityExit=qe(t.opacity!==void 0?t.opacity:1,0,YL(s))):l&&(e.opacity=qe(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let c=0;cst?1:n(Os(e,t,s))}function E0(e,t){e.min=t.min,e.max=t.max}function on(e,t){E0(e.x,t.x),E0(e.y,t.y)}function C0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function T0(e,t,n,s,o){return e-=t,e=fc(e,1/n,s),o!==void 0&&(e=fc(e,1/o,s)),e}function XL(e,t=0,n=1,s=.5,o,l=e,c=e){if(In.test(t)&&(t=parseFloat(t),t=qe(c.min,c.max,t/100)-c.min),typeof t!="number")return;let d=qe(l.min,l.max,s);e===l&&(d-=t),e.min=T0(e.min,t,n,d,o),e.max=T0(e.max,t,n,d,o)}function _0(e,t,[n,s,o],l,c){XL(e,t[n],t[s],t[o],t.scale,l,c)}const ZL=["x","scaleX","originX"],JL=["y","scaleY","originY"];function k0(e,t,n,s){_0(e.x,t,ZL,n?n.x:void 0,s?s.x:void 0),_0(e.y,t,JL,n?n.y:void 0,s?s.y:void 0)}function P0(e){return e.translate===0&&e.scale===1}function qb(e){return P0(e.x)&&P0(e.y)}function R0(e,t){return e.min===t.min&&e.max===t.max}function eD(e,t){return R0(e.x,t.x)&&R0(e.y,t.y)}function A0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Qb(e,t){return A0(e.x,t.x)&&A0(e.y,t.y)}function N0(e){return Gt(e.x)/Gt(e.y)}function O0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class tD{constructor(){this.members=[]}add(t){Xh(this.members,t),t.scheduleRender()}remove(t){if(Zh(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let s;for(let o=n;o>=0;o--){const l=this.members[o];if(l.isPresent!==!1){s=l;break}}return s?(this.promote(s),!0):!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,n&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:s}=t;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function nD(e,t,n){let s="";const o=e.x.translate/t.x,l=e.y.translate/t.y,c=(n==null?void 0:n.z)||0;if((o||l||c)&&(s=`translate3d(${o}px, ${l}px, ${c}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:p,rotate:g,rotateX:y,rotateY:x,skewX:E,skewY:P}=n;p&&(s=`perspective(${p}px) ${s}`),g&&(s+=`rotate(${g}deg) `),y&&(s+=`rotateX(${y}deg) `),x&&(s+=`rotateY(${x}deg) `),E&&(s+=`skewX(${E}deg) `),P&&(s+=`skewY(${P}deg) `)}const d=e.x.scale*t.x,f=e.y.scale*t.y;return(d!==1||f!==1)&&(s+=`scale(${d}, ${f})`),s||"none"}const ds={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Mo=typeof window<"u"&&window.MotionDebug!==void 0,Gd=["","X","Y","Z"],rD={visibility:"hidden"},j0=1e3;let sD=0;function Yd(e,t,n,s){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),s&&(s[e]=0))}function Kb(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=tb(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Me,!(o||l))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&Kb(s)}function Gb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(c={},d=t==null?void 0:t()){this.id=sD++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Mo&&(ds.totalNodes=ds.resolvedTargetDeltas=ds.recalculatedProjection=0),this.nodes.forEach(aD),this.nodes.forEach(fD),this.nodes.forEach(hD),this.nodes.forEach(lD),Mo&&window.MotionDebug.record(ds)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let f=0;fthis.root.updateBlockedByResize=!1;e(c,()=>{this.root.updateBlockedByResize=!0,y&&y(),y=qL(x,250),Yl.hasAnimatedSinceResize&&(Yl.hasAnimatedSinceResize=!1,this.nodes.forEach(D0))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&g&&(f||p)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:x,hasRelativeTargetChanged:E,layout:P})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const C=this.options.transition||g.getDefaultTransition()||vD,{onLayoutAnimationStart:b,onLayoutAnimationComplete:S}=g.getProps(),R=!this.targetLayout||!Qb(this.targetLayout,P)||E,k=!x&&E;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||k||x&&(R||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(y,k);const A={...qh(C,"layout"),onPlay:b,onComplete:S};(g.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A)}else x||D0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=P})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Tn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(pD),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Kb(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let f=0;f{const M=A/1e3;M0(y.x,c.x,M),M0(y.y,c.y,M),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($o(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),gD(this.relativeTarget,this.relativeTargetOrigin,x,M),k&&eD(this.relativeTarget,k)&&(this.isProjectionDirty=!1),k||(k=Ze()),on(k,this.relativeTarget)),C&&(this.animationValues=g,KL(g,p,this.latestValues,M,R,S)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Tn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Me.update(()=>{Yl.hasAnimatedSinceResize=!0,this.currentAnimation=zL(0,j0,{...c,onUpdate:d=>{this.mixTargetDelta(d),c.onUpdate&&c.onUpdate(d)},onComplete:()=>{c.onComplete&&c.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(j0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:d,target:f,layout:p,latestValues:g}=c;if(!(!d||!f||!p)){if(this!==c&&this.layout&&p&&Yb(this.options.animationType,this.layout.layoutBox,p.layoutBox)){f=this.target||Ze();const y=Gt(this.layout.layoutBox.x);f.x.min=c.target.x.min,f.x.max=f.x.min+y;const x=Gt(this.layout.layoutBox.y);f.y.min=c.target.y.min,f.y.max=f.y.min+x}on(d,f),di(d,g),zo(this.projectionDeltaWithTransform,this.layoutCorrected,d,g)}}registerSharedNode(c,d){this.sharedNodes.has(c)||this.sharedNodes.set(c,new tD),this.sharedNodes.get(c).add(d);const p=d.options.initialPromotionConfig;d.promote({transition:p?p.transition:void 0,preserveFollowOpacity:p&&p.shouldPreserveFollowOpacity?p.shouldPreserveFollowOpacity(d):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){var c;const{layoutId:d}=this.options;return d?((c=this.getStack())===null||c===void 0?void 0:c.lead)||this:this}getPrevLead(){var c;const{layoutId:d}=this.options;return d?(c=this.getStack())===null||c===void 0?void 0:c.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:d,preserveFollowOpacity:f}={}){const p=this.getStack();p&&p.promote(this,f),c&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let d=!1;const{latestValues:f}=c;if((f.z||f.rotate||f.rotateX||f.rotateY||f.rotateZ||f.skewX||f.skewY)&&(d=!0),!d)return;const p={};f.z&&Yd("z",c,p,this.animationValues);for(let g=0;g{var d;return(d=c.currentAnimation)===null||d===void 0?void 0:d.stop()}),this.root.nodes.forEach(L0),this.root.sharedNodes.clear()}}}function iD(e){e.updateLayout()}function oD(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=e.layout,{animationType:l}=e.options,c=n.source!==e.layout.source;l==="size"?an(y=>{const x=c?n.measuredBox[y]:n.layoutBox[y],E=Gt(x);x.min=s[y].min,x.max=x.min+E}):Yb(l,n.layoutBox,s)&&an(y=>{const x=c?n.measuredBox[y]:n.layoutBox[y],E=Gt(s[y]);x.max=x.min+E,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[y].max=e.relativeTarget[y].min+E)});const d=ci();zo(d,s,n.layoutBox);const f=ci();c?zo(f,e.applyTransform(o,!0),n.measuredBox):zo(f,s,n.layoutBox);const p=!qb(d);let g=!1;if(!e.resumeFrom){const y=e.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:x,layout:E}=y;if(x&&E){const P=Ze();$o(P,n.layoutBox,x.layoutBox);const C=Ze();$o(C,s,E.layoutBox),Qb(P,C)||(g=!0),y.options.layoutRoot&&(e.relativeTarget=C,e.relativeTargetOrigin=P,e.relativeParent=y)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:f,layoutDelta:d,hasLayoutChanged:p,hasRelativeTargetChanged:g})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function aD(e){Mo&&ds.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function lD(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function cD(e){e.clearSnapshot()}function L0(e){e.clearMeasurements()}function uD(e){e.isLayoutDirty=!1}function dD(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function D0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function fD(e){e.resolveTargetDelta()}function hD(e){e.calcProjection()}function pD(e){e.resetSkewAndRotation()}function mD(e){e.removeLeadSnapshot()}function M0(e,t,n){e.translate=qe(t.translate,0,n),e.scale=qe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function I0(e,t,n,s){e.min=qe(t.min,n.min,s),e.max=qe(t.max,n.max,s)}function gD(e,t,n,s){I0(e.x,t.x,n.x,s),I0(e.y,t.y,n.y,s)}function yD(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const vD={duration:.45,ease:[.4,0,.1,1]},F0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),V0=F0("applewebkit/")&&!F0("chrome/")?Math.round:Ot;function B0(e){e.min=V0(e.min),e.max=V0(e.max)}function xD(e){B0(e.x),B0(e.y)}function Yb(e,t,n){return e==="position"||e==="preserve-aspect"&&!SL(N0(t),N0(n),.2)}function wD(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const bD=Gb({attachResizeListener:(e,t)=>Zo(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Xd={current:void 0},Xb=Gb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xd.current){const e=new bD({});e.mount(window),e.setOptions({layoutScroll:!0}),Xd.current=e}return Xd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),SD={pan:{Feature:FL},drag:{Feature:IL,ProjectionNode:Xb,MeasureLayout:$b}};function U0(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,l=s[o];l&&Me.postRender(()=>l(t,pa(t)))}class ED extends qr{mount(){const{current:t}=this.node;t&&(this.unmount=CO(t,n=>(U0(this.node,n,"Start"),s=>U0(this.node,s,"End"))))}unmount(){}}class CD extends qr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ha(Zo(this.node.current,"focus",()=>this.onFocus()),Zo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function z0(e,t,n){const{props:s}=e;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),l=s[o];l&&Me.postRender(()=>l(t,pa(t)))}class TD extends qr{mount(){const{current:t}=this.node;t&&(this.unmount=PO(t,n=>(z0(this.node,n,"Start"),(s,{success:o})=>z0(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Gf=new WeakMap,Zd=new WeakMap,_D=e=>{const t=Gf.get(e.target);t&&t(e)},kD=e=>{e.forEach(_D)};function PD({root:e,...t}){const n=e||document;Zd.has(n)||Zd.set(n,{});const s=Zd.get(n),o=JSON.stringify(t);return s[o]||(s[o]=new IntersectionObserver(kD,{root:e,...t})),s[o]}function RD(e,t,n){const s=PD(t);return Gf.set(e,n),s.observe(e),()=>{Gf.delete(e),s.unobserve(e)}}const AD={some:0,all:1};class ND extends qr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:o="some",once:l}=t,c={root:n?n.current:void 0,rootMargin:s,threshold:typeof o=="number"?o:AD[o]},d=f=>{const{isIntersecting:p}=f;if(this.isInView===p||(this.isInView=p,l&&!p&&this.hasEnteredView))return;p&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",p);const{onViewportEnter:g,onViewportLeave:y}=this.node.getProps(),x=p?g:y;x&&x(f)};return RD(this.node.current,c,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(OD(t,n))&&this.startObserver()}unmount(){}}function OD({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const jD={inView:{Feature:ND},tap:{Feature:TD},focus:{Feature:CD},hover:{Feature:ED}},LD={layout:{ProjectionNode:Xb,MeasureLayout:$b}},Yf={current:null},Zb={current:!1};function DD(){if(Zb.current=!0,!!Nh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Yf.current=e.matches;e.addListener(t),t()}else Yf.current=!1}const MD=[...Sb,_t,$r],ID=e=>MD.find(bb(e)),$0=new WeakMap;function FD(e,t,n){for(const s in t){const o=t[s],l=n[s];if(kt(o))e.addValue(s,o);else if(kt(l))e.addValue(s,Dn(o,{owner:e}));else if(l!==o)if(e.hasValue(s)){const c=e.getValue(s);c.liveStyle===!0?c.jump(o):c.hasAnimated||c.set(o)}else{const c=e.getStaticValue(s);e.addValue(s,Dn(c!==void 0?c:o,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const H0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class VD{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:o,blockInitialAnimation:l,visualState:c},d={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=op,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const E=Fn.now();this.renderScheduledAtthis.bindToMotionValue(s,n)),Zb.current||DD(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Yf.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){$0.delete(this.current),this.projection&&this.projection.unmount(),Tn(this.notifyUpdate),Tn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=Ls.has(t),o=n.on("change",d=>{this.latestValues[t]=d,this.props.onUpdate&&Me.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),l=n.on("renderRequest",this.scheduleRender);let c;window.MotionCheckAppearSync&&(c=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),l(),c&&c(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ki){const n=ki[t];if(!n)continue;const{isEnabled:s,Feature:o}=n;if(!this.features[t]&&o&&s(this.props)&&(this.features[t]=new o(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ze()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;sn.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=Dn(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){var s;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(s=this.getBaseTargetFromProps(this.props,t))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(xb(o)||ub(o))?o=parseFloat(o):!ID(o)&&$r.test(n)&&(o=gb(t,n)),this.setBaseTarget(t,kt(o)?o.get():o)),kt(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:s}=this.props;let o;if(typeof s=="string"||typeof s=="object"){const c=Fh(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);c&&(o=c[t])}if(s&&o!==void 0)return o;const l=this.getBaseTargetFromProps(this.props,t);return l!==void 0&&!kt(l)?l:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Jh),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Jb extends VD{constructor(){super(...arguments),this.KeyframeResolver=Eb}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;kt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function BD(e){return window.getComputedStyle(e)}class UD extends Jb{constructor(){super(...arguments),this.type="html",this.renderInstance=V1}readValueFromInstance(t,n){if(Ls.has(n)){const s=ip(n);return s&&s.default||0}else{const s=BD(t),o=(M1(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ub(t,n)}build(t,n,s){Uh(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return Wh(t,n,s)}}class zD extends Jb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ze}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ls.has(n)){const s=ip(n);return s&&s.default||0}return n=B1.has(n)?n:Dh(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return $1(t,n,s)}build(t,n,s){zh(t,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,n,s,o){U1(t,n,s,o)}mount(t){this.isSVGTag=Hh(t.tagName),super.mount(t)}}const $D=(e,t)=>Ih(e)?new zD(t):new UD(t,{allowProjection:e!==T.Fragment}),HD=xO({...hL,...jD,...SD,...LD},$D),it=L2(HD);function eS(e,t){let n;const s=()=>{const{currentTime:o}=t,c=(o===null?0:o.value)/100;n!==c&&e(c),n=c};return Me.update(s,!0),()=>Tn(s)}const Xl=new WeakMap;let Nr;function WD(e,t){if(t){const{inlineSize:n,blockSize:s}=t[0];return{width:n,height:s}}else return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}function qD({target:e,contentRect:t,borderBoxSize:n}){var s;(s=Xl.get(e))===null||s===void 0||s.forEach(o=>{o({target:e,contentSize:t,get size(){return WD(e,n)}})})}function QD(e){e.forEach(qD)}function KD(){typeof ResizeObserver>"u"||(Nr=new ResizeObserver(QD))}function GD(e,t){Nr||KD();const n=Gh(e);return n.forEach(s=>{let o=Xl.get(s);o||(o=new Set,Xl.set(s,o)),o.add(t),Nr==null||Nr.observe(s)}),()=>{n.forEach(s=>{const o=Xl.get(s);o==null||o.delete(t),o!=null&&o.size||Nr==null||Nr.unobserve(s)})}}const Zl=new Set;let Ho;function YD(){Ho=()=>{const e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};Zl.forEach(n=>n(t))},window.addEventListener("resize",Ho)}function XD(e){return Zl.add(e),Ho||YD(),()=>{Zl.delete(e),!Zl.size&&Ho&&(Ho=void 0)}}function ZD(e,t){return typeof e=="function"?XD(e):GD(e,t)}const JD=50,W0=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),eM=()=>({time:0,x:W0(),y:W0()}),tM={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function q0(e,t,n,s){const o=n[t],{length:l,position:c}=tM[t],d=o.current,f=n.time;o.current=e[`scroll${c}`],o.scrollLength=e[`scroll${l}`]-e[`client${l}`],o.offset.length=0,o.offset[0]=0,o.offset[1]=o.scrollLength,o.progress=Os(0,o.scrollLength,o.current);const p=s-f;o.velocity=p>JD?0:ep(o.current-d,p)}function nM(e,t,n){q0(e,"x",t,n),q0(e,"y",t,n),t.time=n}function rM(e,t){const n={x:0,y:0};let s=e;for(;s&&s!==t;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if(s.tagName==="svg"){const o=s.getBoundingClientRect();s=s.parentElement;const l=s.getBoundingClientRect();n.x+=o.left-l.left,n.y+=o.top-l.top}else if(s instanceof SVGGraphicsElement){const{x:o,y:l}=s.getBBox();n.x+=o,n.y+=l;let c=null,d=s.parentNode;for(;!c;)d.tagName==="svg"&&(c=d),d=s.parentNode;s=c}else break;return n}const Xf={start:0,center:.5,end:1};function Q0(e,t,n=0){let s=0;if(e in Xf&&(e=Xf[e]),typeof e=="string"){const o=parseFloat(e);e.endsWith("px")?s=o:e.endsWith("%")?e=o/100:e.endsWith("vw")?s=o/100*document.documentElement.clientWidth:e.endsWith("vh")?s=o/100*document.documentElement.clientHeight:e=o}return typeof e=="number"&&(s=t*e),n+s}const sM=[0,0];function iM(e,t,n,s){let o=Array.isArray(e)?e:sM,l=0,c=0;return typeof e=="number"?o=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?o=e.split(" "):o=[e,Xf[e]?e:"0"]),l=Q0(o[0],n,s),c=Q0(o[1],t),l-c}const oM={All:[[0,0],[1,1]]},aM={x:0,y:0};function lM(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function cM(e,t,n){const{offset:s=oM.All}=n,{target:o=e,axis:l="y"}=n,c=l==="y"?"height":"width",d=o!==e?rM(o,e):aM,f=o===e?{width:e.scrollWidth,height:e.scrollHeight}:lM(o),p={width:e.clientWidth,height:e.clientHeight};t[l].offset.length=0;let g=!t[l].interpolate;const y=s.length;for(let x=0;xuM(e,s.target,n),update:o=>{nM(e,n,o),(s.offset||s.target)&&cM(e,n,s)},notify:()=>t(n)}}const Po=new WeakMap,K0=new WeakMap,Jd=new WeakMap,G0=e=>e===document.documentElement?window:e;function dp(e,{container:t=document.documentElement,...n}={}){let s=Jd.get(t);s||(s=new Set,Jd.set(t,s));const o=eM(),l=dM(t,e,o,n);if(s.add(l),!Po.has(t)){const d=()=>{for(const x of s)x.measure()},f=()=>{for(const x of s)x.update(dt.timestamp)},p=()=>{for(const x of s)x.notify()},g=()=>{Me.read(d,!1,!0),Me.read(f,!1,!0),Me.update(p,!1,!0)};Po.set(t,g);const y=G0(t);window.addEventListener("resize",g,{passive:!0}),t!==document.documentElement&&K0.set(t,ZD(t,g)),y.addEventListener("scroll",g,{passive:!0})}const c=Po.get(t);return Me.read(c,!1,!0),()=>{var d;Tn(c);const f=Jd.get(t);if(!f||(f.delete(l),f.size))return;const p=Po.get(t);Po.delete(t),p&&(G0(t).removeEventListener("scroll",p),(d=K0.get(t))===null||d===void 0||d(),window.removeEventListener("resize",p))}}function fM({source:e,container:t,axis:n="y"}){e&&(t=e);const s={value:0},o=dp(l=>{s.value=l[n].progress*100},{container:t,axis:n});return{currentTime:s,cancel:o}}const ef=new Map;function tS({source:e,container:t=document.documentElement,axis:n="y"}={}){e&&(t=e),ef.has(t)||ef.set(t,{});const s=ef.get(t);return s[n]||(s[n]=q1()?new ScrollTimeline({source:t,axis:n}):fM({source:t,axis:n})),s[n]}function hM(e){return e.length===2}function nS(e){return e&&(e.target||e.offset)}function pM(e,t){return hM(e)||nS(t)?dp(n=>{e(n[t.axis].progress,n)},t):eS(e,tS(t))}function mM(e,t){if(e.flatten(),nS(t))return e.pause(),dp(n=>{e.time=e.duration*n[t.axis].progress},t);{const n=tS(t);return e.attachTimeline?e.attachTimeline(n,s=>(s.pause(),eS(o=>{s.time=s.duration*o},n))):Ot}}function gM(e,{axis:t="y",...n}={}){const s={axis:t,...n};return typeof e=="function"?pM(e,s):mM(e,s)}function Y0(e,t){_2(!!(!t||t.current))}const yM=()=>({scrollX:Dn(0),scrollY:Dn(0),scrollXProgress:Dn(0),scrollYProgress:Dn(0)});function vM({container:e,target:t,layoutEffect:n=!0,...s}={}){const o=Oi(yM);return(n?Ec:T.useEffect)(()=>(Y0("target",t),Y0("container",e),gM((c,{x:d,y:f})=>{o.scrollX.set(d.current),o.scrollXProgress.set(d.progress),o.scrollY.set(f.current),o.scrollYProgress.set(f.progress)},{...s,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0})),[e,t,JSON.stringify(s.offset)]),o}function xM(e){const t=Oi(()=>Dn(e)),{isStatic:n}=T.useContext(Sc);if(n){const[,s]=T.useState(e);T.useEffect(()=>t.on("change",s),[])}return t}function rS(e,t){const n=xM(t()),s=()=>n.set(t());return s(),Ec(()=>{const o=()=>Me.preRender(s,!1,!0),l=e.map(c=>c.on("change",o));return()=>{l.forEach(c=>c()),Tn(s)}}),n}const wM=e=>e&&typeof e=="object"&&e.mix,bM=e=>wM(e)?e.mix:void 0;function SM(...e){const t=!Array.isArray(e[0]),n=t?0:-1,s=e[0+n],o=e[1+n],l=e[2+n],c=e[3+n],d=lp(o,l,{mixer:bM(l[0]),...c});return t?d(s):d}function EM(e){Vo.current=[],e();const t=rS(Vo.current,e);return Vo.current=void 0,t}function CM(e,t,n,s){if(typeof e=="function")return EM(e);const o=typeof t=="function"?t:SM(t,n,s);return Array.isArray(e)?X0(e,o):X0([e],([l])=>o(l))}function X0(e,t){const n=Oi(()=>[]);return rS(e,()=>{n.length=0;const s=e.length;for(let o=0;o{p.forEach(g=>{const y=c.get(g.target);if(g.isIntersecting!==!!y)if(g.isIntersecting){const x=t(g);typeof x=="function"?c.set(g.target,x):f.unobserve(g.target)}else typeof y=="function"&&(y(g),c.delete(g.target))})},f=new IntersectionObserver(d,{root:n,rootMargin:s,threshold:typeof o=="number"?o:TM[o]});return l.forEach(p=>f.observe(p)),()=>f.disconnect()}function kM(e,{root:t,margin:n,amount:s,once:o=!1}={}){const[l,c]=T.useState(!1);return T.useEffect(()=>{if(!e.current||o&&l)return;const d=()=>(c(!0),o?void 0:()=>c(!1)),f={root:t&&t.current||void 0,margin:n,amount:s};return _M(e.current,d,f)},[t,e,n,o,s]),l}function PM({scrolled:e}){const[t]=T.useState("QR 18.42 ▲ 0.31");return v.jsx(it.div,{animate:{y:e?-40:0},transition:{duration:.3,ease:[.25,.46,.45,.94]},className:"fixed top-0 inset-x-0 z-[1000] h-10 bg-navy border-b border-gold/20 hidden md:block",children:v.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-10 h-full flex items-center justify-between text-[12px] text-warm-white/80",children:[v.jsxs("span",{className:"tracking-wide",children:["Alrazah Holding (Q.S.C.) is listed on the Qatar Stock Exchange"," ",v.jsx("span",{className:"text-gold mono-data",children:"(Ticker: ALRAZAH)"})]}),v.jsxs("div",{className:"flex items-center gap-6",children:[v.jsxs("button",{className:"hover:text-gold transition-colors tracking-wide",children:["EN ",v.jsx("span",{className:"text-warm-white/40 mx-1",children:"/"})," عربي"]}),v.jsx("span",{className:"text-gold mono-data",children:t})]})]})})}const Z0=[{label:"About Us"},{label:"Our Business",mega:!0},{label:"Investor Relations"},{label:"Sustainability"},{label:"Media Centre"},{label:"Careers"}],RM=[{col:"Real Estate",items:["Residential","Commercial","Retail & Mixed-Use"]},{col:"Logistics & Industrial",items:["Cold Storage","Warehousing","Distribution Centers","Heavy Industrial"]},{col:"Financial Services",items:["Asset Management","Project Management","Treasury"]}];function AM({scrolled:e}){const[t,n]=T.useState(!1),[s,o]=T.useState(!1);return v.jsxs(it.header,{animate:{backgroundColor:e?"rgba(30,42,58,0.85)":"rgba(10,22,40,0)",boxShadow:e?"0 2px 16px rgba(10,22,40,0.12)":"0 0 0 rgba(0,0,0,0)"},transition:{duration:.3},style:{backdropFilter:e?"blur(12px)":"none"},className:`fixed top-0 md:top-10 inset-x-0 z-[900] ${e?"bg-charcoal/85":""}`,children:[v.jsx("div",{className:"max-w-[1440px] mx-auto px-5 md:px-10",children:v.jsxs("div",{className:"h-16 md:h-20 flex items-center justify-between",children:[v.jsxs("a",{href:"/",className:"flex items-center gap-2 group",children:[v.jsx("span",{className:"font-serif-display text-warm-white text-2xl tracking-tight",children:"ALRAZAH"}),v.jsx("span",{className:"text-gold text-[10px] caption-track mt-1 hidden sm:block",children:"HOLDING"})]}),v.jsx("nav",{className:"hidden lg:flex items-center gap-8",children:Z0.map(l=>v.jsxs("div",{className:"relative",onMouseEnter:()=>l.mega&&o(!0),onMouseLeave:()=>l.mega&&o(!1),children:[v.jsxs("button",{className:"text-warm-white text-sm font-medium tracking-[0.04em] hover:text-gold transition-colors flex items-center gap-1 py-2",children:[l.label,l.mega&&v.jsx(Kx,{className:"w-3 h-3"})]}),l.label==="Our Business"&&v.jsx("span",{className:"absolute left-0 -bottom-0.5 h-0.5 w-6 bg-gold origin-left scale-x-0 hover:scale-x-100 transition-transform duration-300"})]},l.label))}),v.jsxs("div",{className:"flex items-center gap-4",children:[v.jsx("button",{className:"hidden md:inline-flex items-center border border-gold text-gold px-6 py-3 text-sm font-semibold tracking-[0.06em] hover:bg-gold hover:text-navy transition-colors duration-200",children:"Investor Login"}),v.jsx("button",{className:"lg:hidden text-gold",onClick:()=>n(!0),"aria-label":"Open menu",children:v.jsx(VT,{className:"w-7 h-7"})})]})]})}),v.jsx(Av,{children:s&&v.jsx(it.div,{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:.25},onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),className:"absolute inset-x-0 top-full hidden lg:block border-t-2 border-gold",style:{backgroundColor:"rgba(30,42,58,0.92)",backdropFilter:"blur(16px)"},children:v.jsx("div",{className:"max-w-[1440px] mx-auto px-10 py-12 grid grid-cols-3 gap-12",children:RM.map(l=>v.jsxs("div",{children:[v.jsx("div",{className:"text-gold caption-track text-xs mb-4",children:l.col}),v.jsx("ul",{className:"space-y-3",children:l.items.map(c=>v.jsx("li",{children:v.jsx("a",{href:"#",className:`block text-sm transition-all duration-200 ${c==="Cold Storage"?"text-gold border-l-2 border-gold pl-3 -ml-3 font-semibold":"text-warm-white hover:text-gold hover:translate-x-1"}`,children:c})},c))})]},l.col))})})}),v.jsx(Av,{children:t&&v.jsxs(v.Fragment,{children:[v.jsx(it.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-navy/60 z-[950] lg:hidden",onClick:()=>n(!1)}),v.jsxs(it.aside,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{duration:.3,ease:[.25,.46,.45,.94]},className:"fixed right-0 top-0 bottom-0 w-[80%] max-w-sm bg-navy z-[960] p-8 flex flex-col",children:[v.jsxs("div",{className:"flex justify-between items-center mb-8",children:[v.jsx("span",{className:"font-serif-display text-warm-white text-2xl",children:"ALRAZAH"}),v.jsx("button",{onClick:()=>n(!1),className:"text-gold","aria-label":"Close menu",children:v.jsx(Gx,{className:"w-7 h-7"})})]}),v.jsx("nav",{className:"flex flex-col gap-1",children:Z0.map(l=>v.jsx("a",{href:"#",className:"text-warm-white text-lg py-3 border-b border-pearl/10 hover:text-gold transition-colors",children:l.label},l.label))}),v.jsx("button",{className:"mt-8 border border-gold text-gold px-6 py-3 text-sm font-semibold tracking-[0.06em] hover:bg-gold hover:text-navy transition-colors",children:"Investor Login"})]})]})})]})}const J0=[{id:"overview",label:"Overview"},{id:"facilities",label:"Facilities"},{id:"zones",label:"Zones"},{id:"compliance",label:"Compliance"},{id:"technology",label:"Technology"},{id:"investor",label:"Investor Data"}];function NM({show:e}){const[t,n]=T.useState("overview");return T.useEffect(()=>{const s=new IntersectionObserver(o=>{o.forEach(l=>{l.isIntersecting&&n(l.target.id)})},{rootMargin:"-40% 0px -55% 0px"});return J0.forEach(o=>{const l=document.getElementById(o.id);l&&s.observe(l)}),()=>s.disconnect()},[]),v.jsx("div",{className:`sticky z-[500] bg-sand border-b border-gold/15 transition-all duration-300 ${e?"top-16 md:top-[7.5rem]":"-top-24"}`,children:v.jsx("div",{className:"max-w-[1440px] mx-auto px-5 md:px-10",children:v.jsx("ul",{className:"flex items-center gap-1 overflow-x-auto scroll-mask-x md:justify-center",children:J0.map(s=>v.jsx("li",{className:"shrink-0",children:v.jsx("a",{href:`#${s.id}`,className:`inline-block px-4 py-4 text-sm transition-colors duration-200 border-b-2 ${t===s.id?"text-gold font-semibold border-gold":"text-charcoal border-transparent hover:text-gold"}`,children:s.label})},s.id))})})})}function OM(e){const[t,n]=T.useState(null);return T.useLayoutEffect(()=>{const s=e.current;if(!s)return;const o=s.getBoundingClientRect();n({width:o.width,height:o.height});const l=new ResizeObserver(([c])=>{const{width:d,height:f}=c.contentRect;n({width:d,height:f})});return l.observe(s),()=>l.disconnect()},[e]),t}const jM={"media.base44.com":"/images/public/","static.wixstatic.com":"/media/"},LM=1024,Jn={OPTIMIZED:"optimized",ORIGINAL:"original",FALLBACK:"fallback"},DM=[1,2,3],MM=6e3;function IM(e){try{const t=new URL(e);if(t.protocol!=="https:"||t.username||t.password||t.port&&t.port!=="443")return null;const n=jM[t.hostname];if(!n)return null;const s=t.pathname.match(/^(.*)\/v1\/(?:fill|fit)\/[^/]+\/[^/]+$/i),o=s?s[1]:t.pathname,l=o.split("/").pop();return!o.startsWith(n)||!l||!/\.[a-z0-9]+$/i.test(l)||/\.svg$/i.test(l)?null:{baseUrl:`${t.origin}${o}`,filename:l}}catch{return null}}const ex=e=>Math.min(Math.max(Math.round(e),1),MM),tx=e=>Math.min(1,Math.max(0,e));function Zf({baseUrl:e,filename:t},{width:n,height:s,crop:o,focalPoint:l,quality:c}){const d=[`w_${ex(n)}`,`h_${ex(s||n)}`];o&&d.push(l?`fp_${tx(l.x).toFixed(2)}_${tx(l.y).toFixed(2)}`:"al_c"),d.push(`q_${c}`,"usm_0.66_1.00_0.01","enc_webp","quality_auto");const f=/\.gif$/i.test(t)?t:t.replace(/\.[a-z0-9]+$/i,"")+".webp";return`${e}/v1/${o?"fill":"fit"}/${d.join(",")}/${f}`}function FM(e,t){return DM.map(n=>`${Zf(e,{...t,width:t.width*n,height:t.height?t.height*n:void 0})} ${n}x`).join(", ")}function VM(e,t){return(t==null?void 0:t.baseUrl)||e}function BM(e){return e===Jn.OPTIMIZED?Jn.ORIGINAL:Jn.FALLBACK}const tf="https://static.wixstatic.com/media/12d367_4f26ccd17f8f4e3a8958306ea08c2332~mv2.png",sS=T.forwardRef(({aspectRatio:e,className:t,style:n,children:s},o)=>v.jsx("span",{ref:o,className:Wr("inline-block relative",t),style:{aspectRatio:e,...n},children:s}));sS.displayName="ImageWrapper";const iS=T.forwardRef(({parsed:e,fittingType:t,focalPoint:n,quality:s,className:o,style:l,aspectRatio:c,onLoad:d,...f},p)=>{const g=T.useRef(null),y=T.useRef(null),x=OM(g),[E,P]=T.useState(!1);T.useImperativeHandle(p,()=>y.current),T.useEffect(()=>{P(!1)},[e.baseUrl]);const C=t!=="fit",b=x&&{width:x.width||LM,height:x.height?x.height:void 0,crop:C,focalPoint:C?n:void 0,quality:s};return v.jsxs(sS,{ref:g,aspectRatio:c,className:o,style:l,children:[b&&!E&&v.jsx("img",{src:Zf(e,{...b,width:20,height:b.height?Math.max(1,Math.round(20*b.height/b.width)):void 0,quality:20}),alt:"","aria-hidden":"true",className:"w-full h-full inset-0 absolute",style:{objectFit:t==="fit"?"contain":"cover",filter:"blur(10px)",transform:"scale(1.1)"}}),b&&v.jsx("img",{ref:y,src:Zf(e,b),srcSet:FM(e,b),loading:"lazy",className:Wr("w-full h-full inset-0 absolute",t==="fit"?"object-contain":"object-cover"),onLoad:S=>{P(!0),d==null||d(S)},...f})]})});iS.displayName="ResponsiveImage";const Rc=T.forwardRef(({src:e,fittingType:t="fill",originWidth:n,originHeight:s,focalPointX:o,focalPointY:l,quality:c=90,onError:d,...f},p)=>{const g=e&&e!==tf?IM(e):null,y=g?Jn.OPTIMIZED:Jn.ORIGINAL,[x,E]=T.useState({src:e,mode:y}),P=x.src===e?x.mode:y;T.useEffect(()=>{E({src:e,mode:y})},[e,y]);const b={...f,onError:A=>{if(P===Jn.FALLBACK)return;const M=BM(P);E({src:e,mode:M}),M===Jn.FALLBACK&&(d==null||d(A))}};if(!e)return v.jsx("img",{ref:p,src:tf,...b,"data-empty-image":!0});const S=P===Jn.OPTIMIZED?g:null;if(!S){const A=P===Jn.FALLBACK,M=A?tf:VM(e,g);return v.jsx("img",{ref:p,src:M,...b,"data-error-image":A||void 0})}const R=typeof o=="number"&&typeof l=="number"?{x:o,y:l}:void 0,k=n&&s?`${n} / ${s}`:void 0;return v.jsx(iS,{ref:p,parsed:S,fittingType:t,focalPoint:R,quality:c,aspectRatio:k,...b})});Rc.displayName="Image";function UM(){const e=["Home","Our Business","Logistics & Industrial","Cold Storage"];return v.jsx("nav",{"aria-label":"Breadcrumb",className:"relative z-20",children:v.jsx("ol",{className:"max-w-[1440px] mx-auto px-5 md:px-10 flex flex-wrap items-center gap-2 text-sm",children:e.map((t,n)=>{const s=n===e.length-1;return v.jsxs("li",{className:"flex items-center gap-2",children:[s?v.jsx("span",{className:"text-gold font-medium",children:t}):v.jsx("a",{href:"#",className:"text-warm-white/70 hover:text-gold transition-colors duration-200",children:t}),!s&&v.jsx("span",{className:"text-warm-white/40",children:"/"})]},t)})})})}const zM="https://media.base44.com/images/public/6a8038051f45959adca00b47/6650525fd_generated_25373db3.png",oS=[.25,.46,.45,.94],$M=[{label:"Total Cold GLA",value:"45K SQM"},{label:"Temperature Zones",value:"5 Ranges"},{label:"N+1 Redundancy",value:"100% Facilities"},{label:"Compliance",value:"HACCP / GDP / WHO"}],Fl=e=>({initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:e,ease:oS}});function HM(){const e=T.useRef(null),{scrollYProgress:t}=vM({target:e,offset:["start start","end start"]}),n=CM(t,[0,1],[0,-60]);return v.jsxs("section",{ref:e,className:"relative w-full h-[100vh] min-h-[600px] max-h-[920px] overflow-hidden",children:[v.jsx("div",{className:"absolute top-0 inset-x-0 z-20 pt-[5.5rem] md:pt-36",children:v.jsx(UM,{})}),v.jsx(it.div,{style:{y:n},className:"absolute inset-0 will-change-transform",children:v.jsx(Rc,{src:zM,alt:"Interior of an Alrazah cold storage facility with insulated panel walls and pallet racking",fittingType:"fill",className:"w-full h-full"})}),v.jsx("div",{className:"absolute inset-0 hero-overlay"}),v.jsx("div",{className:"absolute inset-x-0 bottom-0",children:v.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-10 pb-16 md:pb-24 relative",children:[v.jsx(it.span,{...Fl(.2),className:"block text-gold caption-track text-xs mb-4",children:"Logistics & Industrial — Cold Storage"}),v.jsx(it.h1,{...Fl(.4),className:"font-serif-display font-light text-warm-white text-[38px] md:text-[68px] leading-[1.05] tracking-[-0.02em] max-w-[900px]",children:"Unbroken Cold. Uncompromising Standards."}),v.jsx(it.p,{...Fl(.6),className:"mt-6 text-warm-white/90 text-lg md:text-xl leading-relaxed max-w-[720px]",children:"Alrazah Holding develops and operates temperature-controlled logistics infrastructure that safeguards Qatar's pharmaceutical supply chain and food security. From -25°C deep freeze to +15°C controlled ambient, our facilities maintain validated thermal integrity with N+1 redundancy, continuous digital monitoring, and full HACCP, GDP, and WHO compliance."}),v.jsxs(it.div,{...Fl(.8),className:"mt-10 flex flex-wrap items-center gap-4",children:[v.jsx("button",{className:"bg-gold text-navy px-8 py-4 text-sm font-semibold tracking-[0.06em] hover:bg-deep-gold hover:-translate-y-0.5 hover:shadow-[0_4px_12px_rgba(197,160,89,0.3)] transition-all duration-[250ms]",children:"Explore Cold Chain Facilities"}),v.jsxs("button",{className:"border border-warm-white/60 text-warm-white px-8 py-4 text-sm font-semibold tracking-[0.06em] hover:bg-warm-white hover:text-navy transition-colors duration-[250ms] flex items-center gap-2",children:[v.jsx(lh,{className:"w-4 h-4"}),"Download Cold Chain Portfolio (PDF)"]}),v.jsx("a",{href:"#overview",className:"text-gold text-sm hover:underline underline-offset-4 transition-all",children:"Schedule a Compliance Audit Tour →"})]}),v.jsxs("div",{className:"hidden md:flex flex-col items-center absolute bottom-0 right-10",children:[v.jsx("div",{className:"scroll-pulse-line w-px bg-gold/60"}),v.jsx("span",{className:"text-gold caption-track text-[11px] mt-2",children:"Scroll"})]}),v.jsxs(it.div,{initial:{opacity:0,x:40},animate:{opacity:1,x:0},transition:{duration:.8,delay:1,ease:oS},className:"hidden xl:block absolute right-10 bottom-24 w-[300px] bg-navy/65 border border-pearl/20 p-7",style:{backdropFilter:"blur(10px)"},children:[v.jsx("div",{className:"text-gold caption-track text-[11px]",children:"Cold Chain Portfolio"}),v.jsx("div",{className:"h-px w-8 bg-gold my-3"}),v.jsx("ul",{className:"space-y-3",children:$M.map(s=>v.jsxs("li",{className:"flex items-baseline justify-between gap-4",children:[v.jsx("span",{className:"text-warm-white/70 text-xs",children:s.label}),v.jsx("span",{className:"text-gold mono-data text-lg",children:s.value})]},s.label))})]})]})}),v.jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 md:hidden text-gold animate-bounce",children:v.jsx(Kx,{className:"w-6 h-6"})})]})}const aS=[.25,.46,.45,.94];function zt({children:e,delay:t=0,y:n=40,x:s=0,duration:o=.8,className:l="",once:c=!0}){return v.jsx(it.div,{className:l,initial:{opacity:0,y:n,x:s},whileInView:{opacity:1,y:0,x:0},viewport:{once:c,margin:"-80px"},transition:{duration:o,delay:t,ease:aS},children:e})}function Di({children:e,stagger:t=.1,delay:n=0,className:s=""}){return v.jsx(it.div,{className:s,initial:"hidden",whileInView:"show",viewport:{once:!0,margin:"-80px"},variants:{hidden:{},show:{transition:{staggerChildren:t,delayChildren:n}}},children:e})}function Mi({children:e,y:t=60,className:n=""}){return v.jsx(it.div,{className:n,variants:{hidden:{opacity:0,y:t},show:{opacity:1,y:0,transition:{duration:.7,ease:aS}}},children:e})}const WM=[{label:"-25°C to -18°C",sub:"Frozen Food, Ice Cream",cls:"bg-navy/90 text-warm-white",tooltip:"Zone Volume: 8,400m³ | Redundancy: N+1 | Validation: Q2 2025"},{label:"-18°C to -12°C",sub:"Frozen Meat, Poultry, Seafood",cls:"bg-navy/70 text-warm-white",tooltip:"Zone Volume: 11,200m³ | Redundancy: N+1 | Validation: Q2 2025"},{label:"+2°C to +8°C",sub:"Dairy, Fresh Produce, Vaccines",cls:"bg-charcoal/50 text-warm-white",tooltip:"Zone Volume: 9,600m³ | Redundancy: N+1 | Validation: Q2 2025"},{label:"+8°C to +15°C",sub:"Pharmaceuticals, Chocolate, Flowers",cls:"bg-alrazah-slate/25 text-charcoal",tooltip:"Zone Volume: 7,800m³ | Redundancy: N+1 | Validation: Q2 2025"},{label:"+15°C to +25°C",sub:"Ambient Pharma, Medical Devices",cls:"bg-sand/60 text-charcoal",tooltip:"Zone Volume: 8,000m³ | Redundancy: N+1 | Validation: Q2 2025"}];function qM(){const[e,t]=T.useState(null);return v.jsx("section",{id:"overview",className:"bg-sand py-16 md:py-24",children:v.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-10 grid grid-cols-1 lg:grid-cols-[52%_48%] gap-10 lg:gap-16 items-start",children:[v.jsxs(zt,{children:[v.jsx("span",{className:"text-gold caption-track text-xs",children:"Strategic Overview"}),v.jsx("h2",{className:"font-serif-display text-navy text-4xl md:text-5xl leading-[1.1] tracking-[-0.01em] mt-4 mb-8",children:"Thermal Integrity as National Infrastructure"}),v.jsx("p",{className:"text-charcoal text-lg md:text-xl leading-relaxed max-w-[640px]",children:"Qatar imports over 90% of its food and relies on global pharmaceutical supply chains for essential medicines. Every kilogram of frozen meat, every pallet of vaccines, and every shipment of insulin depends on cold chain infrastructure that maintains precise temperature bands without interruption. A single excursion can render products unsafe, ineffective, or legally undistributable."}),v.jsx("p",{className:"text-charcoal text-base leading-[1.7] max-w-[640px] mt-6",children:"Alrazah Holding's cold storage division operates at the intersection of food security policy and pharmaceutical compliance. Our facilities are not merely refrigerated warehouses — they are validated thermal ecosystems with segregated temperature zones, positive air pressure differentials, automated monitoring with SMS and email alerting, and backup diesel generators that ensure continuity through Qatar's summer peak demand periods."}),v.jsxs("div",{className:"mt-12 flex items-center gap-6",children:[v.jsx("div",{className:"w-px h-16 bg-gold shrink-0"}),v.jsxs("div",{children:[v.jsx("p",{className:"font-serif-display italic text-navy text-2xl md:text-3xl leading-tight max-w-[560px]",children:'"In cold chain logistics, there is no such thing as a small temperature excursion. There is only compliance — or catastrophe."'}),v.jsx("p",{className:"text-alrazah-slate text-sm mt-3",children:"— Alrazah Holding Quality Assurance & Compliance"})]})]})]}),v.jsxs(zt,{delay:.2,className:"bg-warm-white border border-gold/15 rounded-lg shadow-[0_4px_24px_rgba(10,22,40,0.08)] p-6 md:p-8",children:[v.jsx("div",{className:"text-navy caption-track text-xs mb-5",children:"Multi-Zone Capability"}),v.jsx("div",{className:"flex flex-col gap-1",children:WM.map((n,s)=>v.jsxs(it.div,{initial:{opacity:0,x:20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.5,delay:s*.12},onMouseEnter:()=>t(s),onMouseLeave:()=>t(null),className:`relative p-4 rounded transition-transform duration-200 ${n.cls} ${e===s?"scale-y-105 z-10":e!==null?"opacity-40":""}`,children:[v.jsx("div",{className:"mono-data text-gold text-lg",children:n.label}),v.jsx("div",{className:"caption-track text-[11px] mt-1 opacity-80",children:n.sub}),e===s&&v.jsx("div",{className:"absolute left-full top-1/2 -translate-y-1/2 ml-3 bg-navy text-warm-white text-xs p-3 rounded shadow-lg w-max max-w-[260px] z-20 hidden md:block",children:n.tooltip})]},n.label))}),v.jsx("p",{className:"text-alrazah-slate text-xs mt-5 text-center",children:"Hover a zone to view volume, redundancy & validation data."})]})]})})}const QM=[{name:"Alrazah Pharma Cold Chain Centre, Doha",location:"Doha Industrial Area",status:"Operational",grade:"GDP / WHO",desc:"A 12,000 SQM multi-zone cold storage facility with +2°C to +8°C pharmaceutical chambers, -25°C deep freeze, and +15°C controlled ambient zones. Features N+1 refrigeration redundancy, validated temperature mapping, and GDP-compliant documentation.",img:"https://media.base44.com/images/public/6a8038051f45959adca00b47/404a011cb_generated_0db1f5c2.png",specs:{"Total GLA":"12,000 SQM","Temp. Range":"-25°C to +15°C",Chambers:"8 Zones",Redundancy:"N+1","Backup Power":"72 hrs",Validation:"Q2 2025"},tenant:"Primary Use: Pharmaceutical Distribution / 3PL",tags:["Pharma-Grade","Multi-Zone"]},{name:"Al Wakra Frozen Food Hub",location:"Al Wakra",status:"Operational",grade:"HACCP Certified",desc:"An 18,000 SQM frozen food distribution hub serving Qatar's retail and import sectors. Four temperature zones from -25°C deep freeze to -12°C standard frozen, with blast freezing capability and HACCP-certified handling protocols.",img:"https://media.base44.com/images/public/6a8038051f45959adca00b47/ac4360b5b_generated_6c016183.png",specs:{"Total GLA":"18,000 SQM","Temp. Range":"-25°C to -12°C",Chambers:"4 Zones",Redundancy:"N+1","Backup Power":"72 hrs",Validation:"Q2 2025"},tenant:"Primary Use: Food Import / Retail Distribution",tags:["Food-Grade"]},{name:"Ras Abu Fontas Multi-Temperature Hub",location:"Ras Abu Fontas",status:"Operational",grade:"Customs Bonded",desc:"A 9,000 SQM multi-temperature consolidation facility with six segregated zones from -18°C frozen to +8°C chilled. Customs bonded status enables re-export processing aligned with SFDA requirements for Gulf-wide distribution.",img:"https://media.base44.com/images/public/6a8038051f45959adca00b47/6ae233ed9_generated_97d7262d.png",specs:{"Total GLA":"9,000 SQM","Temp. Range":"-18°C to +8°C",Chambers:"6 Zones",Redundancy:"N+1","Backup Power":"72 hrs",Validation:"Q1 2025"},tenant:"Primary Use: FMCG / Customs Bonded Re-Export",tags:["Multi-Zone","Bonded"]},{name:"Lusail Medical Logistics Centre",location:"Lusail",status:"Under Construction",grade:"GDP / MoPH",desc:"A 6,000 SQM medical logistics centre designed to GDP and Ministry of Public Health standards, with five temperature zones from +2°C pharmaceutical cold to +25°C controlled ambient. Expected operational handover Q4 2026.",img:"https://media.base44.com/images/public/6a8038051f45959adca00b47/52fee26c2_generated_6d4d0ffc.png",specs:{"Total GLA":"6,000 SQM","Temp. Range":"+2°C to +25°C",Chambers:"5 Zones",Redundancy:"N+1","Backup Power":"72 hrs",Validation:"Q4 2026"},tenant:"Primary Use: Pharmaceutical / Medical Device Distribution",tags:["Pharma-Grade","Multi-Zone"]}],KM=["All","Pharma-Grade","Food-Grade","Multi-Zone","Bonded"];function GM(){const[e,t]=T.useState("All"),n=QM.filter(s=>e==="All"||s.tags.includes(e));return v.jsx("section",{id:"facilities",className:"bg-warm-white py-16 md:py-24",children:v.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-10",children:[v.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-end lg:justify-between gap-6",children:[v.jsxs("div",{children:[v.jsx("span",{className:"text-gold caption-track text-xs",children:"Facilities"}),v.jsx("h2",{className:"font-serif-display text-navy text-4xl md:text-5xl tracking-[-0.01em] mt-3",children:"Temperature-Controlled Assets"}),v.jsx("p",{className:"text-alrazah-slate mt-2 max-w-xl",children:"Operational and development-ready cold chain facilities with multi-zone capability and validated compliance."})]}),v.jsx("div",{className:"flex flex-wrap gap-2",children:KM.map(s=>v.jsx("button",{onClick:()=>t(s),className:`px-5 py-2 text-sm rounded transition-all duration-200 ${e===s?"bg-navy text-warm-white":"border border-alrazah-slate/30 text-alrazah-slate hover:border-gold hover:text-gold"}`,children:s},s))})]}),v.jsx(Di,{stagger:.15,className:"mt-12 grid grid-cols-1 md:grid-cols-2 gap-10",children:n.map(s=>v.jsx(Mi,{children:v.jsxs("article",{className:"group bg-sand rounded-lg overflow-hidden border border-gold/15 hover:border-gold/30 hover:-translate-y-1 hover:shadow-[0_12px_48px_rgba(10,22,40,0.16)] transition-all duration-[400ms]",children:[v.jsxs("div",{className:"relative aspect-video overflow-hidden",children:[v.jsx(Rc,{src:s.img,alt:s.name,fittingType:"fill",className:"w-full h-full transition-transform duration-[600ms] group-hover:scale-105"}),v.jsxs("div",{className:"absolute top-4 left-4 flex gap-2",children:[v.jsx("span",{className:"bg-navy/80 backdrop-blur-sm px-3 py-1 text-warm-white caption-track text-[10px]",children:s.status}),v.jsx("span",{className:"bg-success/80 px-3 py-1 text-white caption-track text-[10px]",children:s.grade})]})]}),v.jsxs("div",{className:"p-8",children:[v.jsx("div",{className:"text-gold caption-track text-xs",children:s.location}),v.jsx("h4",{className:"font-serif-display text-navy text-xl md:text-2xl mt-2",children:s.name}),v.jsx("p",{className:"text-alrazah-slate text-sm leading-relaxed mt-3 line-clamp-3",children:s.desc}),v.jsx("div",{className:"grid grid-cols-3 gap-3 mt-5",children:Object.entries(s.specs).map(([o,l])=>v.jsxs("div",{className:"border-l border-gold/20 pl-2",children:[v.jsx("div",{className:"text-alrazah-slate caption-track text-[10px]",children:o}),v.jsx("div",{className:"mono-data text-charcoal text-sm",children:l})]},o))}),v.jsx("p",{className:"text-alrazah-slate text-sm italic mt-4",children:s.tenant}),v.jsx("a",{href:"#",className:"block text-gold text-sm mt-5 hover:underline underline-offset-4",children:"View Validation Documentation →"})]})]})},s.name))}),v.jsx("div",{className:"text-center mt-12",children:v.jsx("button",{className:"border border-gold text-gold px-8 py-3.5 text-sm font-semibold tracking-[0.06em] hover:bg-gold hover:text-navy transition-colors duration-200",children:"View All Cold Chain Assets"})})]})})}const YM=[{badge:"-25°C to -18°C",title:"Deep Freeze",badgeCls:"bg-navy text-gold",desc:"For frozen food long-term storage, ice cream, and certain biological samples. Blast freezing capability available.",specs:{Uniformity:"±1.5°C",Recovery:"< 20 min",Insulation:"200mm PIR"},compliance:"HACCP VALIDATED"},{badge:"-18°C to -12°C",title:"Frozen",badgeCls:"bg-charcoal text-gold",desc:"Standard frozen storage for meat, poultry, seafood, and prepared foods. The backbone of Qatar's frozen food security.",specs:{Uniformity:"±1.0°C",Recovery:"< 15 min",Insulation:"150mm PIR"},compliance:"HACCP VALIDATED"},{badge:"+2°C to +8°C",title:"Chilled",badgeCls:"bg-alrazah-slate text-warm-white",desc:"The pharmaceutical gold standard. For vaccines, insulin, biologics, dairy, and fresh produce. Most critical zone.",specs:{Uniformity:"±0.5°C",Recovery:"< 10 min",Insulation:"150mm PIR"},compliance:"GDP + WHO VALIDATED"},{badge:"+8°C to +15°C",title:"Cool",badgeCls:"bg-pearl text-navy",desc:"For temperature-sensitive pharmaceuticals, chocolate, confectionery, and floral products. Positive pressure maintained.",specs:{Uniformity:"±1.0°C",Humidity:"< 65% RH",Insulation:"100mm PIR"},compliance:"GDP VALIDATED"},{badge:"+15°C to +25°C",title:"Controlled Ambient",badgeCls:"bg-sand text-navy",desc:"For ambient pharmaceuticals, medical devices, and products requiring protection from Qatar's extreme summer heat.",specs:{Uniformity:"±2.0°C",Humidity:"< 60% RH",Insulation:"80mm PIR"},compliance:"GDP VALIDATED"}];function XM(){return v.jsx("section",{id:"zones",className:"bg-navy py-16 md:py-24 text-warm-white",children:v.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-10",children:[v.jsxs("div",{className:"text-center max-w-[800px] mx-auto",children:[v.jsx("span",{className:"text-gold caption-track text-xs",children:"Thermal Engineering"}),v.jsx("h2",{className:"font-serif-display text-4xl md:text-5xl mt-3 tracking-[-0.01em]",children:"Five Zones. One Standard: Zero Excursion."}),v.jsx("p",{className:"text-warm-white/85 text-lg md:text-xl leading-relaxed mt-4",children:"Our cold storage facilities are engineered to maintain precise temperature bands with validated uniformity, redundant plant, and continuous digital monitoring — ensuring that every product remains within its specified thermal envelope."})]}),v.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 gap-6 mt-16",children:YM.map((e,t)=>v.jsxs(it.div,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:t*.1},className:"bg-warm-white/[0.05] border border-pearl/15 rounded-lg p-6 hover:bg-warm-white/[0.08] hover:border-gold/40 transition-all duration-300 flex flex-col items-center text-center",children:[v.jsx("div",{className:`w-14 h-14 rounded-full flex items-center justify-center mono-data text-xs ${e.badgeCls}`,children:e.badge}),v.jsx("h4",{className:"font-serif-display text-xl mt-5",children:e.title}),v.jsx("p",{className:"text-warm-white/75 text-sm leading-relaxed mt-3",children:e.desc}),v.jsx("div",{className:"h-0.5 w-6 bg-gold my-5"}),v.jsx("ul",{className:"space-y-2 w-full",children:Object.entries(e.specs).map(([n,s])=>v.jsxs("li",{className:"flex flex-col",children:[v.jsx("span",{className:"text-alrazah-slate caption-track text-[10px]",children:n}),v.jsx("span",{className:"mono-data text-gold text-sm",children:s})]},n))}),v.jsxs("div",{className:"flex items-center gap-1.5 text-success caption-track text-[10px] mt-5",children:[v.jsx(Qx,{className:"w-3.5 h-3.5"})," ",e.compliance]})]},e.title))}),v.jsx(zt,{delay:.3,className:"border-t border-pearl/20 pt-8 mt-16 max-w-[800px] mx-auto text-center",children:v.jsx("p",{className:"text-warm-white/90 text-lg leading-relaxed",children:"All zones are constructed with insulated panel systems, vapor-sealed floors, and air-lock ante-rooms that prevent temperature migration during door openings. Every chamber undergoes full thermal validation mapping before operational handover."})})]})})}const ZM=[{Icon:$T,title:"HACCP Certified",body:"Hazard Analysis Critical Control Point systems implemented across all food-grade facilities. Critical limits, monitoring procedures, and corrective actions documented for every temperature-controlled process. Audited annually by accredited third parties."},{Icon:OT,title:"GDP Compliant",body:"Good Distribution Practice compliance for pharmaceutical storage and transport. Full batch traceability, qualified equipment, trained personnel, and deviation management protocols. Aligned with EU GDP Guidelines and WHO TRS 961."},{Icon:DT,title:"WHO Pre-Qualified",body:"Vaccine storage and distribution capabilities meet WHO Performance Quality and Safety (PQS) standards. Temperature monitoring devices, cold boxes, and vaccine carriers validated for national immunization program support."},{Icon:_T,title:"MoPH Registered",body:"All pharmaceutical cold storage facilities are registered with the Qatar Ministry of Public Health and subject to periodic inspection. Electronic documentation systems enable real-time reporting to regulatory authorities when required."}],JM=["Temperature mapping with calibrated data loggers at 9+ points per chamber","Door opening recovery tests under maximum load conditions","Power failure simulation and backup system auto-start validation","Refrigeration plant switchover testing for N+1 redundancy verification","Annual re-validation and re-mapping as part of continuous compliance"];function eI(){return v.jsx("section",{id:"compliance",className:"bg-sand py-16 md:py-24",children:v.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-10",children:[v.jsxs(zt,{children:[v.jsx("span",{className:"text-gold caption-track text-xs",children:"Compliance & Validation"}),v.jsx("h2",{className:"font-serif-display text-navy text-4xl md:text-5xl tracking-[-0.01em] mt-3",children:"Certified. Audited. Documented."}),v.jsx("p",{className:"text-charcoal max-w-[680px] mt-3 leading-relaxed",children:"Our cold chain facilities adhere to the highest international standards for food safety and pharmaceutical distribution, with full documentation, temperature mapping, and independent audit trails."})]}),v.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 mt-12",children:[v.jsx(Di,{stagger:.1,className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:ZM.map(e=>v.jsx(Mi,{children:v.jsxs("div",{className:"bg-warm-white border border-gold/15 p-8 rounded hover:border-gold hover:-translate-y-0.5 transition-all duration-200 h-full",children:[v.jsx(e.Icon,{className:"w-6 h-6 text-success"}),v.jsx("h4",{className:"font-serif-display text-navy text-xl mt-3",children:e.title}),v.jsx("p",{className:"text-charcoal text-sm leading-relaxed mt-2",children:e.body})]})},e.title))}),v.jsxs(it.div,{initial:{opacity:0,x:40},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.8,ease:[.25,.46,.45,.94]},className:"bg-navy text-warm-white p-8 md:p-12 rounded-lg h-full flex flex-col",children:[v.jsx("span",{className:"text-gold caption-track text-xs",children:"Validation Protocol"}),v.jsx("h4",{className:"font-serif-display text-2xl mt-4",children:"Thermal Mapping & Qualification"}),v.jsx("p",{className:"text-warm-white/80 mt-3",children:"Every temperature-controlled chamber undergoes Installation Qualification (IQ), Operational Qualification (OQ), and Performance Qualification (PQ) before operational handover. This includes:"}),v.jsx("ul",{className:"mt-6 space-y-4 flex-1",children:JM.map(e=>v.jsxs("li",{className:"flex gap-3",children:[v.jsx(Qx,{className:"w-4 h-4 text-gold shrink-0 mt-0.5"}),v.jsx("span",{className:"text-warm-white/85 text-sm",children:e})]},e))}),v.jsx("div",{className:"border-t border-pearl/30 my-6"}),v.jsx("p",{className:"text-warm-white italic",children:"Zero regulatory findings across all facilities in FY2025 audits."}),v.jsx("a",{href:"#",className:"text-gold text-sm mt-6 hover:underline underline-offset-4",children:"Request Validation Summary →"})]})]})]})})}const tI=[{name:"Chamber A — Pharma Chilled",temp:"+4.2°C",status:"STABLE",rh:"58% RH",path:"M0 18 Q15 14 30 16 T60 15"},{name:"Chamber B — Deep Freeze",temp:"-22.1°C",status:"STABLE",rh:"—",path:"M0 12 Q15 10 30 11 T60 12"},{name:"Chamber C — Controlled Ambient",temp:"+19.8°C",status:"STABLE",rh:"54% RH",path:"M0 14 Q15 16 30 13 T60 14"}],nI=[{title:"Wireless Sensor Mesh",body:"Calibrated wireless temperature and humidity sensors deployed at rack level throughout every chamber. Data transmitted every 60 seconds via redundant gateway infrastructure.",metrics:"Interval: 60s | Accuracy: ±0.1°C | Battery: 5-year"},{title:"Multi-Channel Alerts",body:"Deviation alerts delivered via SMS, email, and push notification to facility management, tenant representatives, and Alrazah operations center within 60 seconds of threshold breach.",metrics:"Latency: < 60s | Channels: 3 | Escalation: 3-tier"},{title:"Audit-Ready Data",body:"All temperature data logged to secure cloud storage with tamper-proof timestamps. Reports generated automatically for regulatory audits, tenant SLA verification, and insurance compliance.",metrics:"Retention: 7 years | Export: PDF/CSV | Access: 24/7"},{title:"Diesel + UPS Redundancy",body:"Every facility equipped with automatic diesel generator start and UPS bridge power. Fuel reserves sufficient for 72 hours of full refrigeration load during grid outage.",metrics:"UPS: 30 min bridge | Diesel: 72 hrs | Auto-start: < 10s"}];function rI(){return v.jsx("section",{id:"technology",className:"bg-warm-white py-16 md:py-24",children:v.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-10",children:[v.jsxs(zt,{children:[v.jsx("span",{className:"text-gold caption-track text-xs",children:"Technology & Monitoring"}),v.jsx("h2",{className:"font-serif-display text-navy text-4xl md:text-5xl tracking-[-0.01em] mt-3",children:"24/7 Visibility. Zero Blind Spots."}),v.jsx("p",{className:"text-charcoal max-w-[680px] mt-3 leading-relaxed",children:"Our cold chain facilities are monitored by continuous digital systems that detect temperature deviations in real time, alert operators instantly, and log every data point for regulatory audit trails."})]}),v.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[55%_45%] gap-12 mt-12",children:[v.jsxs(zt,{className:"bg-navy rounded-lg overflow-hidden p-8 h-[480px] flex flex-col",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("span",{className:"text-gold caption-track text-xs",children:"Alrazah Cold Chain Monitoring"}),v.jsx("span",{className:"text-alrazah-slate mono-data text-xs",children:"Live: 14:32:08 AST | 11 Aug 2026"})]}),v.jsx("div",{className:"flex flex-col gap-4 mt-6 flex-1",children:tI.map((e,t)=>v.jsxs(it.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.5,delay:t*.15},className:"bg-warm-white/[0.05] border border-pearl/20 p-5 rounded flex items-center justify-between",children:[v.jsxs("div",{className:"flex-1",children:[v.jsx("div",{className:"text-warm-white text-sm",children:e.name}),v.jsx("div",{className:"mono-data text-gold text-2xl mt-1",children:e.temp}),v.jsxs("div",{className:"text-success caption-track text-[10px] mt-1 flex items-center gap-1",children:[v.jsx("span",{className:"inline-block w-2 h-2 rounded-full bg-success system-glow"}),e.status]})]}),v.jsxs("div",{className:"text-right",children:[v.jsx("svg",{width:"60",height:"24",viewBox:"0 0 60 24",className:"block",children:v.jsx("path",{d:e.path,fill:"none",stroke:"#C5A059",strokeWidth:"1.5",className:"spark-draw"})}),v.jsx("div",{className:"text-alrazah-slate caption-track text-[10px] mt-1",children:e.rh})]})]},e.name))}),v.jsxs("div",{className:"mt-4 bg-arz-error/10 border border-arz-error/30 p-4 rounded flex items-center gap-3",children:[v.jsx(AT,{className:"w-4 h-4 text-success"}),v.jsx("span",{className:"text-success text-sm",children:"No active alerts. All systems nominal."})]})]}),v.jsx(Di,{stagger:.1,className:"flex flex-col gap-4",children:nI.map(e=>v.jsx(Mi,{y:20,children:v.jsxs("div",{className:"bg-sand border border-gold/15 p-6 rounded hover:border-gold hover:translate-x-1 transition-all duration-200",children:[v.jsx("h4",{className:"font-serif-display text-navy text-xl",children:e.title}),v.jsx("p",{className:"text-charcoal text-sm leading-relaxed mt-2",children:e.body}),v.jsx("div",{className:"text-alrazah-slate caption-track text-[10px] mt-3",children:e.metrics})]})},e.title))})]})]})})}const nx=[{label:"Hamad Port Reefer Terminal",sub:"-25°C maintained",shape:"circle",cls:"bg-navy text-warm-white border-2 border-navy"},{label:"Reefer Truck",sub:"GPS + Temp monitored",shape:"rect",cls:"bg-navy text-warm-white border-2 border-gold"},{label:"Alrazah Cold Store",sub:"Multi-zone | N+1",shape:"rect-lg",cls:"bg-gold text-navy border-2 border-gold"},{label:"Refrigerated Delivery",sub:"Validated cold boxes",shape:"rect",cls:"bg-navy text-warm-white border-2 border-gold"},{label:"Final Destination",sub:"Pharmacy / Retail",shape:"circle",cls:"bg-warm-white text-navy border-2 border-gold"}],sI=[{title:"Hamad Port Reefer Terminal",body:"Direct reefer container handling at Hamad Port with dedicated cold chain facilities. Alrazah cold stores are positioned within 15km of the port to minimize ambient exposure during container devanning.",metrics:"2 Facilities | 22K SQM | 12km to Port"},{title:"Doha Industrial Area",body:"Primary national cold chain hub serving pharmaceutical distributors, supermarket chains, and HMC/Qatar Foundation medical corridor. Direct Doha Expressway access for refrigerated last-mile delivery.",metrics:"2 Facilities | 18K SQM | National Hub"},{title:"Al Wakra Logistics Corridor",body:"Southern cold chain node positioned for frozen and chilled food distribution to Al Wakra, Mesaieed, and southern Doha. Critical for Qatar's strategic food reserve and retail replenishment.",metrics:"1 Facility | 5K SQM | Southern Catchment"}];function iI({item:e,i:t}){return v.jsxs(it.div,{initial:{opacity:0,scale:.8},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{duration:.5,delay:t*.15},className:"flex flex-col items-center text-center shrink-0",children:[e.shape==="circle"?v.jsxs("div",{className:`w-[72px] h-[72px] rounded-full flex items-center justify-center caption-track text-[9px] leading-tight px-1 ${e.cls}`,children:[e.label.split(" ")[0],v.jsx("br",{}),e.label.split(" ").slice(1).join(" ")]}):e.shape==="rect-lg"?v.jsx("div",{className:`w-[120px] h-[80px] rounded flex items-center justify-center caption-track text-[9px] leading-tight px-2 ${e.cls}`,children:e.label}):v.jsx("div",{className:`w-[100px] h-[60px] rounded flex items-center justify-center caption-track text-[9px] leading-tight px-2 ${e.cls}`,children:e.label}),v.jsx("span",{className:"mono-data text-alrazah-slate text-[10px] mt-2",children:e.sub})]})}function oI(){return v.jsx("section",{className:"bg-sand py-16 md:py-24",children:v.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-10",children:[v.jsxs(zt,{children:[v.jsx("span",{className:"text-gold caption-track text-xs",children:"Connectivity"}),v.jsx("h2",{className:"font-serif-display text-navy text-4xl md:text-5xl tracking-[-0.01em] mt-3",children:"From Reefer Vessel to Refrigerated Dock"}),v.jsx("p",{className:"text-charcoal max-w-[680px] mt-3 leading-relaxed",children:"Our cold storage facilities are positioned to minimize break in the cold chain from Hamad Port's reefer terminals to final distribution across Qatar."})]}),v.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[55%_45%] gap-12 mt-12",children:[v.jsxs(zt,{className:"bg-warm-white border border-gold/15 rounded-lg p-8 md:p-10 h-[480px] flex flex-col justify-center",children:[v.jsx("div",{className:"text-gold caption-track text-[11px] text-center mb-8",children:"Unbroken Cold Chain: -25°C to +8°C"}),v.jsx("div",{className:"flex items-center justify-between gap-2 overflow-x-auto pb-4",children:nx.map((e,t)=>v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(iI,{item:e,i:t}),tv.jsx(Mi,{y:20,children:v.jsxs("div",{className:"bg-sand border border-gold/15 p-6 rounded hover:border-gold hover:translate-x-1 transition-all duration-200",children:[v.jsx("h4",{className:"font-serif-display text-navy text-xl",children:e.title}),v.jsx("p",{className:"text-charcoal text-sm leading-relaxed mt-2",children:e.body}),v.jsx("div",{className:"text-alrazah-slate caption-track text-[10px] mt-3",children:e.metrics})]})},e.title))})]})]})})}const aI=[{Icon:WT,title:"High-Efficiency Plant",body:"Ammonia/CO2 cascade refrigeration systems with COP ratings 25% above industry baseline. Variable speed compressors, electronic expansion valves, and optimized defrost cycles reduce energy consumption per cubic meter of cooled space by 30% versus legacy R22 systems.",cta:"View Refrigeration Efficiency Data →"},{Icon:QT,title:"Solar-Powered Cooling",body:"Rooftop solar PV arrays sized to offset peak daytime refrigeration load — when cooling demand and solar generation are highest. Battery storage provides 2-hour bridge power for critical control systems during grid transitions.",cta:"Solar Integration Specifications →"},{Icon:UT,title:"Waste Heat Recovery",body:"Condenser waste heat recovered for underfloor heating in loading docks, hot water for staff welfare facilities, and glycol-based door air curtains that prevent cold air loss during truck loading.",cta:"Heat Recovery Systems →"}],lI=["30% ↓ kWh/m³","100% Solar Offset","Zero Ammonia Leaks"];function cI(){return v.jsx("section",{className:"bg-warm-white py-16 md:py-24",children:v.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-10",children:[v.jsxs("div",{className:"text-center max-w-[720px] mx-auto",children:[v.jsx("span",{className:"text-gold caption-track text-xs",children:"Sustainability"}),v.jsx("h2",{className:"font-serif-display text-navy text-4xl md:text-5xl tracking-[-0.01em] mt-3",children:"Cold Without Waste"}),v.jsx("p",{className:"text-charcoal text-lg leading-relaxed mt-4",children:"Refrigeration is energy-intensive by nature. Our facilities integrate high-efficiency plant, heat recovery, and renewable energy to minimize carbon intensity per pallet-hour of cooling."})]}),v.jsx(Di,{stagger:.15,className:"grid grid-cols-1 md:grid-cols-3 gap-8 mt-16",children:aI.map(e=>v.jsx(Mi,{children:v.jsxs("div",{className:"bg-sand p-8 md:p-10 rounded-lg h-full flex flex-col",children:[v.jsx(e.Icon,{className:"w-12 h-12 text-gold",strokeWidth:1.5}),v.jsx("h4",{className:"font-serif-display text-navy text-xl md:text-2xl mt-5",children:e.title}),v.jsx("p",{className:"text-charcoal text-sm leading-relaxed mt-3 flex-1",children:e.body}),v.jsxs("a",{href:"#",className:"text-gold text-sm mt-5 inline-flex items-center gap-1 hover:underline underline-offset-4",children:[e.cta," ",v.jsx(qx,{className:"w-3.5 h-3.5"})]})]})},e.title))}),v.jsx(zt,{delay:.2,className:"mt-16",children:v.jsxs("div",{className:"bg-navy text-warm-white p-8 md:p-12 rounded border-l-4 border-gold flex flex-col md:flex-row md:items-center md:justify-between gap-6",children:[v.jsx("h3",{className:"font-serif-display text-2xl md:text-3xl",children:"Target: Net-Zero Cold Chain Operations by 2035"}),v.jsx("div",{className:"flex flex-wrap items-center gap-6",children:lI.map((e,t)=>v.jsxs("div",{className:"flex items-center gap-6",children:[t>0&&v.jsx("span",{className:"hidden md:block w-px h-10 bg-pearl/30"}),v.jsx("span",{className:"mono-data text-gold text-2xl md:text-[32px]",children:e})]},e))})]})})]})})}const uI=[{value:680,prefix:"QAR ",suffix:"M",label:"Total Portfolio Value",change:"+18.6% YoY"},{value:45,prefix:"",suffix:"K SQM",label:"Total Cold GLA",change:"+12.0% YoY"},{value:100,prefix:"",suffix:"%",label:"Occupancy Rate",change:"+0.0pp YoY"},{value:11.2,prefix:"",suffix:"%",label:"Gross Yield",change:"+0.8pp YoY"},{value:8.4,prefix:"",suffix:" yrs",label:"WALT",change:"+1.2 years YoY"}],dI=["Revenue: QAR 76M (+20% YoY)","NOI: QAR 68M (+18% YoY)","Net Asset Value: QAR 540M","Debt-to-Equity: 0.42x (conservative for specialized assets)","Return on Cost: 21.4%","Tenant Retention: 100%"],fI=["Capital cost: 3.5× ambient per SQM","Regulatory compliance: Continuous audit and re-validation","Technical expertise: Refrigeration engineering scarce in region","Tenant stickiness: 100% retention; relocation cost prohibitive","Demand growth: Qatar food security + pharma import growth"];function hI({m:e,run:t}){const[n,s]=T.useState(0);T.useEffect(()=>{if(!t)return;let l;const c=performance.now(),d=1500,f=p=>{const g=Math.min((p-c)/d,1),y=1-Math.pow(2,-10*g);s(e.value*y),g<1?l=requestAnimationFrame(f):s(e.value)};return l=requestAnimationFrame(f),()=>cancelAnimationFrame(l)},[t,e.value]);const o=e.value%1===0?Math.round(n).toLocaleString():n.toFixed(1);return v.jsxs("span",{className:"mono-data text-gold text-3xl md:text-[48px] lg:text-[64px] leading-none",children:[e.prefix,o,e.suffix]})}function pI(){const e=T.useRef(null),t=kM(e,{once:!0,margin:"-100px"});return v.jsx("section",{id:"investor",ref:e,className:"bg-navy text-warm-white py-16 md:py-24",children:v.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-10",children:[v.jsxs(zt,{children:[v.jsx("span",{className:"text-gold caption-track text-xs",children:"Investor Information"}),v.jsx("h2",{className:"font-serif-display text-4xl md:text-5xl tracking-[-0.01em] mt-3",children:"Cold Chain Division Performance"})]}),v.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 mt-12 divide-pearl/20 divide-x border-y border-pearl/20",children:uI.map(n=>v.jsxs("div",{className:"px-4 py-8 text-center",children:[v.jsx(hI,{m:n,run:t}),v.jsx("div",{className:"text-warm-white/80 text-xs mt-2",children:n.label}),v.jsx("div",{className:"text-success caption-track text-[10px] mt-1",children:n.change})]},n.label))}),v.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 mt-16",children:[v.jsxs(zt,{className:"bg-warm-white/[0.05] p-8 md:p-10 rounded-lg",children:[v.jsx("h4",{className:"font-serif-display text-2xl",children:"FY 2025 Cold Chain Division Highlights"}),v.jsx("ul",{className:"mt-6 space-y-4",children:dI.map(n=>v.jsxs("li",{className:"flex items-start gap-3",children:[v.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gold shrink-0 mt-2"}),v.jsx("span",{className:"text-warm-white/90 text-sm",children:n})]},n))}),v.jsxs("button",{className:"mt-8 border border-gold text-gold px-7 py-3.5 text-sm font-semibold tracking-[0.06em] hover:bg-gold hover:text-navy transition-colors duration-200 inline-flex items-center gap-2",children:[v.jsx(lh,{className:"w-4 h-4"}),"Download FY2025 Cold Chain Supplement (PDF)"]})]}),v.jsxs(zt,{delay:.2,className:"bg-warm-white/[0.05] p-8 md:p-10 rounded-lg",children:[v.jsx("h4",{className:"font-serif-display text-2xl",children:"Supply-Constrained Market Leadership"}),v.jsx("p",{className:"text-warm-white/85 mt-3 leading-relaxed text-sm",children:"Cold storage is the highest-barrier sub-sector in Qatar logistics. Capital costs per SQM are 3.5× ambient warehousing, refrigeration expertise is scarce, and regulatory compliance demands continuous investment. These barriers protect incumbent operators and support premium rents. Alrazah's early-mover position and vertically integrated project management capabilities provide a structural competitive advantage."}),v.jsx("ul",{className:"mt-6 space-y-3",children:fI.map(n=>v.jsxs("li",{className:"flex items-start gap-3",children:[v.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gold shrink-0 mt-2"}),v.jsx("span",{className:"text-warm-white/85 text-sm",children:n})]},n))}),v.jsx("p",{className:"text-warm-white/70 text-sm italic mt-6",children:"No competing cold storage development within 8km of our Doha facilities. Market vacancy rate: < 2%."})]})]})]})})}const mI=[{title:"Warehousing",sub:"Ambient Storage & Consolidation",img:"https://media.base44.com/images/public/6a8038051f45959adca00b47/f9deecf1d_generated_072a695d.png"},{title:"Distribution Centers",sub:"High-Velocity Cross-Dock & Fulfillment",img:"https://media.base44.com/images/public/6a8038051f45959adca00b47/6bc2d11a3_generated_4bb0afb3.png"},{title:"Heavy Industrial",sub:"Yards, Open Storage & Heavy Fabrication",img:"https://media.base44.com/images/public/6a8038051f45959adca00b47/61f08d8e5_generated_996f5f63.png"}];function gI(){return v.jsxs(v.Fragment,{children:[v.jsx("section",{className:"bg-gold py-16 md:py-20",children:v.jsx("div",{className:"max-w-[1440px] mx-auto px-5 md:px-10 text-center",children:v.jsxs(zt,{children:[v.jsx("h2",{className:"font-serif-display text-navy text-4xl md:text-5xl tracking-[-0.01em]",children:"Secure the Cold Chain. Or the Yield."}),v.jsx("p",{className:"text-navy/85 text-lg leading-relaxed mt-4 max-w-[840px] mx-auto",children:"Whether you are a pharmaceutical distributor, food importer, or 3PL seeking temperature-controlled infrastructure in Qatar, or an institutional investor seeking exposure to supply-constrained cold chain real estate, Alrazah Holding invites you to engage."}),v.jsxs("div",{className:"mt-10 flex flex-wrap items-center justify-center gap-4",children:[v.jsx("button",{className:"bg-navy text-warm-white px-8 py-4 text-sm font-semibold tracking-[0.06em] hover:bg-charcoal hover:-translate-y-0.5 hover:shadow-[0_8px_24px_rgba(10,22,40,0.2)] transition-all duration-[250ms]",children:"Enquire About Cold Storage Tenancy"}),v.jsx("button",{className:"border border-navy text-navy px-8 py-4 text-sm font-semibold tracking-[0.06em] hover:bg-navy hover:text-warm-white transition-colors duration-[250ms]",children:"Contact Investor Relations"}),v.jsxs("a",{href:"#",className:"text-navy text-sm underline underline-offset-4 inline-flex items-center gap-2 hover:opacity-70 transition-opacity",children:[v.jsx(lh,{className:"w-4 h-4"}),"Download Corporate Profile (PDF)"]})]})]})})}),v.jsx("section",{className:"bg-sand py-16 md:py-24",children:v.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-10",children:[v.jsxs(zt,{children:[v.jsx("span",{className:"text-gold caption-track text-xs",children:"Explore Logistics & Industrial"}),v.jsx("h2",{className:"font-serif-display text-navy text-4xl md:text-5xl tracking-[-0.01em] mt-3",children:"Related Capabilities"})]}),v.jsx(Di,{stagger:.1,className:"grid grid-cols-1 md:grid-cols-3 gap-8 mt-12",children:mI.map(e=>v.jsx(Mi,{children:v.jsxs("a",{href:"#",className:"group relative block h-[400px] rounded-lg overflow-hidden",children:[v.jsx(Rc,{src:e.img,alt:e.title,fittingType:"fill",className:"w-full h-full transition-transform duration-[600ms] group-hover:scale-105"}),v.jsx("div",{className:"absolute inset-0 card-hover-overlay"}),v.jsxs("div",{className:"absolute bottom-0 inset-x-0 p-8",children:[v.jsx("span",{className:"text-gold caption-track text-xs",children:e.title}),v.jsx("h4",{className:"font-serif-display text-warm-white text-2xl mt-1",children:e.sub}),v.jsx("span",{className:"text-gold text-sm mt-2 inline-block",children:"Explore →"})]})]})},e.title))})]})})]})}const yI=[{title:"Our Business",links:["Real Estate","Logistics & Industrial","Asset Management","Project Management"]},{title:"Investor Relations",links:["Financial Reports","Stock Information","Governance","AGM Materials","Contact IR"]}];function vI(){return v.jsx("footer",{className:"bg-navy pt-24 pb-12 text-warm-white",children:v.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-10",children:[v.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-12",children:[v.jsxs("div",{children:[v.jsx("div",{className:"font-serif-display text-2xl tracking-tight mb-4",children:"ALRAZAH"}),v.jsx("p",{className:"text-sm text-alrazah-slate leading-relaxed mb-6",children:"A Qatari public shareholding company listed on the Qatar Stock Exchange. Building Qatar's future since 2008."}),v.jsx("div",{className:"flex items-center gap-3",children:[IT,XT,e_].map((e,t)=>v.jsx("a",{href:"#","aria-label":"Social link",className:"w-10 h-10 rounded-full border border-pearl/30 flex items-center justify-center text-warm-white hover:bg-gold hover:border-gold hover:text-navy transition-colors duration-200",children:v.jsx(e,{className:"w-4 h-4"})},t))})]}),yI.map(e=>v.jsxs("div",{children:[v.jsx("div",{className:"text-gold caption-track text-xs mb-4",children:e.title}),v.jsx("ul",{className:"space-y-3",children:e.links.map(t=>v.jsx("li",{children:v.jsx("a",{href:"#",className:"text-sm text-warm-white hover:text-gold hover:translate-x-1 inline-block transition-all duration-200",children:t})},t))})]},e.title)),v.jsxs("div",{children:[v.jsx("div",{className:"text-gold caption-track text-xs mb-4",children:"Contact"}),v.jsxs("ul",{className:"space-y-3 text-sm text-warm-white/80",children:[v.jsx("li",{children:"Alrazah Tower, West Bay, Doha, State of Qatar"}),v.jsx("li",{className:"mono-data",children:"+974 4412 3400"}),v.jsx("li",{className:"mono-data",children:"info@alrazahholding.qa"})]}),v.jsxs("div",{className:"mt-6",children:[v.jsx("div",{className:"text-gold caption-track text-xs mb-3",children:"Subscribe to Investor Updates"}),v.jsxs("div",{className:"flex items-center border border-pearl/20 focus-within:border-gold focus-within:shadow-[0_0_0_2px_rgba(197,160,89,0.3)] transition-all rounded",children:[v.jsx("input",{type:"email",placeholder:"Email address",className:"flex-1 bg-transparent px-3 py-2.5 text-sm text-warm-white placeholder:text-alrazah-slate outline-none"}),v.jsx("button",{"aria-label":"Subscribe",className:"px-3 text-gold hover:text-navy hover:bg-gold transition-colors",children:v.jsx(qx,{className:"w-4 h-4"})})]})]})]})]}),v.jsxs("div",{className:"border-t border-pearl/10 mt-12 pt-6 flex flex-col md:flex-row justify-between gap-4 text-xs text-alrazah-slate",children:[v.jsx("span",{children:"© 2026 Alrazah Holding Q.P.S.C. All rights reserved."}),v.jsx("div",{className:"flex flex-wrap gap-4",children:["Privacy Policy","Terms of Use","Accessibility","Sitemap"].map(e=>v.jsx("a",{href:"#",className:"hover:text-warm-white transition-colors",children:e},e))})]})]})})}function xI(){const[e,t]=T.useState(!1),[n,s]=T.useState(!1);return T.useEffect(()=>{const o=()=>{const l=window.scrollY;t(l>100),s(l>window.innerHeight*.55)};return window.addEventListener("scroll",o,{passive:!0}),o(),()=>window.removeEventListener("scroll",o)},[]),v.jsxs("div",{className:"bg-sand",children:[v.jsx(PM,{scrolled:e}),v.jsx(AM,{scrolled:e}),v.jsx(HM,{}),v.jsx(NM,{show:n}),v.jsx(qM,{}),v.jsx(GM,{}),v.jsx(XM,{}),v.jsx(eI,{}),v.jsx(rI,{}),v.jsx(oI,{}),v.jsx(cI,{}),v.jsx(pI,{}),v.jsx(gI,{}),v.jsx(vI,{})]})}const wI=()=>{const{isLoadingAuth:e,isLoadingPublicSettings:t,authError:n,navigateToLogin:s}=v2();if(t||e)return v.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:v.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(n){if(n.type==="user_not_registered")return v.jsx(x2,{});if(n.type==="auth_required")return s(),null}return v.jsxs(vP,{children:[v.jsx(Ef,{path:"/our-business/logistics-industrial/cold-storage",element:v.jsx(xI,{})}),v.jsx(Ef,{path:"*",element:v.jsx(g2,{})})]})};function bI(){return v.jsx(y2,{children:v.jsxs(xk,{client:Ok,children:[v.jsxs(bP,{children:[v.jsx(b2,{}),v.jsx(wI,{})]}),v.jsx(Q_,{})]})})}mC.createRoot(document.getElementById("root")).render(v.jsx(bI,{}));